Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

MP3-Beating Compression

Name: kieren_j 2006-04-26 17:08

You probably don't believe me, but if you're at all interested in my new "CAR" compression alogrithm, check this out:

The strange thing is, it works better on compressed files!
Zipping an MP3 file gives you 99% of original, but check this out!

**** TESTS ON UNCOMPRESSED FILES ****

TXT File Example
TXT File: 1,318,671
Savings: 1,308,940
CAR File: 9,731
Percent: 0.7%

WAV File Example
WAV File: 8,362,354
Savings: 8,323,477
CAR File: 38,877
Percent: 0.5%

EXE File Example
EXE File: 216,064
Savings: 213,336
CAR File: 2,728
Percent: 1.3%


**** TESTS ON ALREADY-COMPRESSED FILES ****

MP3 File Example
MP3 File: 4,961,773
Savings: 4,945,669
CAR File: 16,104
Percent: 0.3%



MPG File Example
MPG File: 5,976,068
Savings: 5,946,909
CAR File: 29,159
Percent: 0.5%


If you didn't see it first time, I compressed an MP3 file from 5 meg to 16kb.
What CAR actually does is obviously a complete secret, but I'm really really excited about it! I've been thinking of how to do it for years - but now, yay! (I figured it out playing around in QB, of all things!).
What I want to know is basically are there any sites that are relatively easy to understand that tell you how to do:

* Huffman Compression
* LZW Compression
* "Textbook" RLE Compression (I only know PCX's RLE)

I know that you use binary trees and nodes and so on but I have no idea for a software implementation!
Anyways you probably don't believe me, but I just wanna try to make the compression better.

Thanks from a very very excited
Kieren Johnstone

Name: Anonymous 2006-04-26 17:18

This is how it's done:
First, you must realize that zero is nothing. Nothing is useless, so I strip all zeros out of the binary data.

After that, all that is left is a very long string of 1's. This string is compacted to a single 'one', along with a number indicating it's length. Then I add my signature and some other overhead, including a bit of random data to give a unique hash, thus ending up at between 2-16kb of compressed data.

I call this CAR, for Compress and Add Random.

Name: Anonymous 2006-04-26 17:37

>>1
Count argument FTW?

Name: Anonymous 2006-04-26 18:06

Information theory says you are a fucking idiot.

Name: Anonymous 2006-04-26 18:10 (sage)

/r/ source code for CAR file extractor

Name: Anonymous 2006-04-26 19:34

>>4
This is obviously parody.

Name: Anonymous 2006-04-26 20:09

Thats old man. They used that in lzip in 2002 or 2003. It was an april fools joke.

Name: Anonymous 2006-04-26 21:09

Same person as next-gen game engine post?

Name: Anonymous 2006-04-27 5:03

>>7
2000.

>>8
Same pastaman at least.

Source, a legendary GameDev thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=11259

Name: Anonymous 2006-04-27 7:08

Lots of Italians in here

Name: Anonymous 2006-04-27 9:23

>>1
Your silly compression is nothing compared to mine. I call it delete and it produces a 100% savings!

**** TESTS ON UNCOMPRESSED FILES ****

TXT File Example
TXT File: 1,318,671
Savings: 1,318,671
Deleted File: 0
Percent: 0.0%

WAV File Example
WAV File: 8,362,354
Savings: 8,362,354
Deleted File: 0
Percent: 0.0%

EXE File Example
EXE File: 216,064
Savings: 216,064
Deleted File: 0
Percent: 0.0%


**** TESTS ON ALREADY-COMPRESSED FILES ****

MP3 File Example
MP3 File: 4,961,773
Savings: 4,961,773
Deleted File: 0
Percent: 0.0%


MPG File Example
MPG File: 5,976,068
Savings: 5,976,068
Deleted File: 0
Percent: 0.0%

Name: Anonymous 2006-04-27 14:16

I make the filename store the contents of the file
It takes up 0 bytes.

Name: Anonymous 2006-04-27 18:50

I take the filename and store it in an NTFS alternate data stream, then truncate the file at 0 bytes. It will appear that the file is zero bytes, yet the data can be retrieved if you know the key to access the data stream.

Name: Anonymous 2006-04-27 21:24

Name: Anonymous 2006-04-27 23:23

I wrote a program that looks at the amount of free disk space, multiplies it by 2, and then outputs it.

Double disk space!!! No effort FTW!

Using similar technology, I wrote a program that multiplies ANYONE's reported bandwidth by a factor of 2000.  It's like I have a fucking T3 up in here W00T!

Name: Anonymous 2006-04-28 0:31

T3's are really slow these days, aren't they?

I have a friend who swears by his 56kpbs OC192 though. That must be awesome.

Name: Anonymous 2006-04-28 1:30

Using proxies that doesn't make any diference

Name: Anonymous 2006-04-28 3:11

You're all idiots. The very fact that you saved the file means that you used the directory tree, thus, your file isn't 0 bytes because your file also takes in account, oh oh, the file name itself. I got a better compression algorithm, DTF. Delete the file, 100% savings, and the best you guys could do was 99%? psh.

Name: Anonymous 2006-04-28 3:41

I've got better, move the file to your googlefs, box.net, or openomy drive, HAHA! Eat that!

Name: Anonymous 2006-04-28 5:37

>>18
I am suing you for infringment of my patent!

Name: Anonymous 2006-04-29 4:42

OH SHI- I just found the BEST COMPRESSION SCHEME EVAR!
NEVER EVEN CREATE THE FILE
or DIRECT IT TO /DEV/NULL

takes no directory bytes, it's literally nothing!

Name: Anonymous 2006-04-29 18:57 (sage)

>>21
It takes the effort of recreating the (potential) file content when your memory gets flushed.

Name: Anonymous 2006-04-29 23:23

>>20

I'm wondering if I should call yours prior art for my algorithm. It deletes the file, then deletes another random file. Negative compression!!!

Call me.

Name: Anonymous 2006-04-30 0:49

ZOMG
THIS FORMAT COMMAND DOES THE ULTIMATE COMPRESSION
REDUCES ALL FILES TO NOTHINGNESS
SAVE, FORMAT, SAVE, FORMAT, I AM 31337XORZ

Name: Anonymous 2006-04-30 7:07

>>23
I believe we can reach a mutually beneficial agreement.

Name: Anonymous 2006-05-05 7:21

Fap fap fap fap fap

Name: Anonymous 2006-05-05 7:42

>>26
Good job motherfucker, you've just bumped this

Name: Anonymous 2006-05-05 8:20 (sage)

>>27
Sage this thread

Name: Anonymous 2006-05-05 8:40 (sage)

Sage?
Sage!

Name: Anonymous 2006-05-05 8:59 (sage)

>>28
No point in saging when it's first. It was at the top when I insulted >>26

Name: Sage Patrol 2006-05-05 9:48 (sage)

Sage

Name: Anonymous 2006-05-05 11:48 (sage)

sage

Name: Anonymous 2006-05-05 13:34

age

Name: Anonymous 2006-05-05 16:01 (sage)

>>33
Sage?!
Sage?!

Name: Anonymous 2006-05-06 19:32 (sage)

SAGE MOTHERFUCKER, YOU CHECK IT?

Name: Anonymous 2006-05-07 6:08 (sage)

SAGE YES

Name: Anonymous 2006-05-10 9:34 (sage)

i'd

Name: Anonymous 2006-05-10 9:35 (sage)

sage

Name: Anonymous 2006-05-10 9:35 (sage)

it

Name: Anonymous 2006-05-10 9:35 (sage)

five

Name: Anonymous 2006-05-10 9:35 (sage)

times

Name: Anonymous 2008-06-17 15:36

HURRRRRRRRRRRRRRRRRRRRRRR my other car is a cudder DURRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

I posted this thread in the dark ages of /prog/.

Name: Anonymous 2008-06-17 15:48

The decompression method would be CDR amirite?

Name: Anonymous 2008-06-17 16:01

>Anyways you probably don't believe me
Truth, enjoy your fail.

Name: Anonymous 2008-06-17 16:03

i am a JAVA. i ahev a long doc and i make programs w/ my API. if you dont repost this comment on 10 other pages i will hax your anus tonight and make a mess of your computer and ass

Name: Anonymous 2008-06-17 16:04

Back to gamedev.net, please

Name: Anonymous 2008-06-17 16:10

>>46
no yuo poppet

Name: Anonymous 2010-06-07 6:39

Hi, I can spam /prog/ too, you faggot.

Also, smoke weed everyday.

Name: Anonymous 2011-02-03 1:44

Name: Anonymous 2012-03-28 2:21

my farts burn my anus
it hurts
in a good way

Name: Anonymous 2013-07-25 18:52

Name: Anonymous 2013-07-25 19:47

PROTOFROZENVOID

Name: opus lossy master ch. 2013-07-25 22:12

Name: Anonymous 2013-07-26 22:18

lol

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-27 5:20

MP3-Beating Compression
MIDI, MOD, IT, XM, ...

Name: Anonymous 2013-07-27 5:45

Kieren Johnstone
Looks like a real dude. Every once in a while some retard re-invents infinity compression again.

America even has a few patents on this: http://www.patentstorm.us/patents/5533051.html


Recently on Russian TV there was a story about undergrad student compressing blue-ray discs down to few kbs: http://engineerblog.ru/algoritm-arhivatsii-babushkina/

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-27 5:50

>>56
compressing blue-ray discs down to few kbs
Also known as "downloading a .torrent file".

Name: Anonymous 2013-07-27 6:23

I agree with the fact that you can create an infinite algorithm (ie, recursive) compression, but superfluous to some minimum limit. However, to completely agree with the fact that the author of a patent is not the order of the head when he said that "you can always compress any sequence of 2 bits up to 1!"

It is very similar to the invention of recursive compression - working ... However, the program runs very slowly. Compresses to a certain limit. And slowly - this is because currently work function blunt brute force because of what you have to wait a data compression (pre-modern as concise archiving software) by several dozen KB to 1-2KB already for weeks, even months! And all that is required for the super-fold increase in the efficiency of my program - so it's help in writing a long arithmetic modules as efficiently utilizing the resources of modern CPUs. If you wish to participate in this PROJECT - I do not need financial aid (at this stage) - that will appreciate such a module by writing a long arithmetic. I myself would be happy to pay for your work in case of success. To contact e-mail: wvanea@yahoo.com

Name: Anonymous 2013-07-27 6:26

frozenvoid's school of retards

Name: Anonymous 2013-07-27 6:32


It is mathematically impossible to create a program compressing without loss
*all* files by at least one bit (see below and also item 73 in part 2 of this
FAQ). Yet from time to time some people claim to have invented a new algorithm
for doing so. Such algorithms are claimed to compress random data and to be
applicable recursively, that is, applying the compressor to the compressed
output of the previous run, possibly multiple times. Fantastic compression
ratios of over 100:1 on random data are claimed to be actually obtained.

Such claims inevitably generate a lot of activity on comp.compression, which
can last for several months. Large bursts of activity were generated by WEB
Technologies and by Jules Gilbert. Premier Research Corporation (with a
compressor called MINC) made only a brief appearance but came back later with a
Web page at http://www.pacminc.com.  The Hyper Space method invented by David
C. James is another contender with a patent obtained in July 96. Another large
burst occured in Dec 97 and Jan 98: Matthew Burch <apoc@pipeline.com> applied
for a patent in Dec 97, but publicly admitted a few days later that his method
was flawed; he then posted several dozen messages in a few days about another
magic method based on primes, and again ended up admitting that his new method
was flawed. (Usually people disappear from comp.compression and appear again 6
months or a year later, rather than admitting their error.)

Other people have also claimed incredible compression ratios, but the programs
(OWS, WIC) were quickly shown to be fake (not compressing at all).

Name: Anonymous 2013-07-27 7:06

Compression doesn't have to be two way. There are a lot of algorithms, which compress data.  But there is no sensible inverse for these functions. These algorithms are not loss less.

Your function also hasn't a sensible inverse. The entropy in a mp3 file, the amount of redundant information, is not enough to compress it loss less in the amount of data you describe. Thus your algorithm is a one way compression function, which looses information.

With the amount of information you are storing (16 kilobytes), you can label all stars (~10^24) in 10^39432 universes. And we only have one universe. 

There are a lot of one way compression algorithms which perform much better than your retarded CAR algorithm. The "top" performers in this field can label all stars (and more) into 512 bits with almost zero change of collision. Even 256 bits are enough.

Name: Anonymous 2013-07-27 7:36

>>60
but it's almost trivial if you don't count storing the length of the original file..

Name: Anonymous 2013-07-27 7:45

well, you can represent -1 + 2^n sequences using all 2^1 ... 2^(n-1) sequences.. =)

Name: Anonymous 2013-07-27 7:49

then all you really need to do is find a good way to efficiently 'point' to where you want to start counting ^^

Name: Anonymous 2013-07-27 8:09

Compression works different on different entropy levels.
1.low entropy content like bitmaps compresses excellent.
2.high-entropy like 7zip files don't compress at all.
If there was a way to convert the high-entropy data into a low-entropy form, it would be possible to recursively compress data to some minimal block, but the information required to convert the low-entropy data to high-entropy data will also grow:
meaning even if such compression existed it would have a concrete limit depending on initial entropy.
I think there is potential to use some bit-reordering algorithms like http://en.wikipedia.org/wiki/Delta_encoding
example:
011101011010101110101110011010 can be encoded as difference between 2 bits(starting from initial(not in string) 0, with 1 as 'change' and 0 as 'no change') like:
010011110111111001111001010111 and again
011010001100000101000101111100 and again
010111001010000111100111000010 each time entropy of the string changes, the problem is finding the one with lower entropy.
now if we have a string of bits, and number of times to delta encode(or some other method) it to a slightly lower entropy form we can compress the results string to smaller size, and the process could be repeated again until the 'number of encode passes' metadata would grow to nullify any further compression.

Name: Anonymous 2013-07-27 8:12

>>65

This is what a burrows wheeler transformation does on a somewhat higher level.

Name: Anonymous 2013-07-27 9:04

some Bit reordering ideas >>65 :
00101110 each 2bit groups can be rotated to make
00011101 [12345678]->[21436587] or some arbitrary order like [12345678]->[84173265] for each and then rotated .
Another approach would be XORing with some short binary string(finding a random string which would lower entropy would be hard, especially if its larger than 4-5 bytes) crafted to decrease the entropy of majority of input.

Name: Anonymous 2013-07-27 9:14

>>67
This is a reasonable viable transformation, which seems to lower entropy, just propagate all prior values with xor to the next values. There is also an inverse of this operation:


{-# LANGUAGE ViewPatterns #-}
module Mod where

import Math.NumberTheory.Logarithms
import Data.Word
import Data.List 
import Data.Bits
import Test.QuickCheck

-- calculating shannon entropy


entropy :: Ord a => [a] -> Double
entropy s =
 sum . map lg' . fq' . map (fromIntegral.length) . group . sort $ s
  where lg' c = (c * ) . logBase 2 $ 1.0 / c
        fq' c = map (\x -> x / (sum c)) c

--
-- x1 x2 x3
-- y1 = x1 xor 0 
-- y2 = x1 xor x2
-- y3 = x1 xor x2 xor x3
--
-- Reverse operation
-- x3 = y3 `xor` y2 = x1 `xor` x2 `xor` x3 `xor` x1 `xor` x2
--             = (x1 `xor` x1) `xor` (x2 `xor` x2) `xor` x3
--                  = x3
-- etc

downwardMixin :: [Word32] -> [Word32]
downwardMixin xs = reverse $ worker (reverse xs)
    where worker  (x:y:xs) = let b = x `xor` y in b : worker (y:xs)
          worker [] = []
          worker  [x] = [x]

upwardMixin :: [Word32] -> [Word32]
upwardMixin xs = worker 0 xs
    where worker z (x:xs) = let b = x `xor` z in b : worker b xs
          worker z [] = [] 

-- calculating entropy of downward, id, upward 
calculateVariants :: [Word32] -> (Double,Double,Double)
calculateVariants xs = (entropy $ downwardMixin xs, entropy xs,  entropy $ upwardMixin xs)

-- downwardMixin . upwardMixin
prop_rev_upwardmixin = property test
    where test :: [Word32] -> Bool
          test x = 
            downwardMixin (upwardMixin x) == x

-- downwardMixin . upwardMixin
prop_rev_downwardmixin  = property test
    where test :: [Word32] -> Bool
          test x = upwardMixin (downwardMixin x) == x

Name: Anonymous 2013-07-27 9:28

>>67
>00101110 each 2bit groups can be rotated
Its equivalent to 1to1 character tables since it doesn't leave the boundary of a byte, and thus cannot change any entropy.
XORing with some short binary string
You have to find something that results in a lot of repeating zero or one but 'xoring short string' will only work for rare cases which are "close to the string" and in the rest will increase entropy.

Name: Anonymous 2013-07-27 9:38

>>65
What if the number of such delta encoding steps is in the trillions or more? the permutation space for a relatively large (e.g. 1MB) binary string grows at power of 2^nbits(string length~ 2^(8e6) for 1MB) and searching trillions of delta permutations to find one which has lower entropy would take years. Shorter strings have lower permutation spaces but they also have less chance to reduce entropy since the length of string for which entropy is lowered is substantially smaller(and for very short strings, insignificant).

Name: Anonymous 2013-07-27 9:57

>>70
Yeah, compressing a few bytes in short string is counter-productive but it serves a purpose of demonstrating the effect. example(we assume the metadata about number of steps is not counted as part of compressed output):
we have string
0101 and want to compress it with delta :
0111 this has 3 1's and single zero at start
0100
0110
0101 cycle ends with same number
Obviously some of these string are better for compression(theoretically), especially 0111.
now with 5 bits
11001 delta:
10101
11111 <--entropy reduced at step 3
10000
11000
10100
11110
10001
11001 cycle ends.

Name: Anonymous 2013-07-27 9:58

Dude, where's my "CAR"?
Right next to my "CDR"!

Name: Anonymous 2013-07-27 10:04

>>70
Wrong! The permutation space is only n for n bits(8 million for 1 MB file which can be easily checked on modern computer).

Name: Anonymous 2013-07-27 10:17

>>73
8 million permutations of delta encoded file will take
(assuming 1 billion ops/sec, 1mb file should be delta encoded in ~125k substitutions(with int delta tables) and ~125k jumps(to switch between zero/one tables) and checking entropy for each step would take a lot more, at least a few seconds.
Multiplying this by 8 million gives 16-32 millions of seconds which is 185-370 DAYS for all permutations of 1MB file.

Name: >>53 2013-07-27 11:36

>>55
This is a quicker link:
http://en.wikipedia.org/wiki/Module_file

But I completely agree. Just pointing which is the best lossy type. MIDI master race

>>57
Nah, any magnet link or distributed file in a mesh network.

>>58
Why we make deltas:
http://en.wikipedia.org/wiki/Delta_compression
We are making CTM @Freebsd. You are welcome to join us.

>>60
Wat?:
http://en.wikipedia.org/wiki/Lossless_compression
 --LZMA2

>>65
High five?

>>51-75
I am surprised that this thread was revived by >>51. But our points have been taken into consideration.

Name: Anonymous 2013-07-27 14:03

checked em >> 77

Name: Anonymous 2013-07-27 14:04

checkem

nikita is a cunt, and PHP rULEZ

Name: Anonymous 2013-07-27 14:12

>>77
checked. lol i know rite

Name: Anonymous 2013-07-28 14:00

>>78

lol :D I put my full fist in my sisters cunt xD

Name: Anonymous 2013-07-28 14:02

>>79
Ouch xD, I hope she's ok lol :D

Name: Anonymous 2013-07-28 14:52

>>71

That idea is implemented in:

>>68

Some of those cycle you mention have a shannon entropy of 0. Which is quite good from a compression perspective.

Name: Anonymous 2013-07-28 16:30

>>81

But on the average it performs not too great. It lowers on pseudo-random lists of 100 word32's on average the entropy with 0.11 and a mean deviation of 6.35*10^-2. Maybe on more structured data it performs better. I suspect it would, but have not test it.

Name: Anonymous 2013-07-28 16:52

If one adds somewhat more structure, it is heightened to 0.2. (Word32's between 0 255).

Name: Anonymous 2013-07-28 17:17

If you ISE PHP hyou cannot go wrong. Zend Framework has a standard code snippets, which you can use: http://www.zend.com//code/codex.php?ozid=954&single=1

You can download all the code snippets to enhance your zend experience. This is called modeular programming.

Name: ‮ 2013-07-28 17:18

checked em with aryan pride! >>88

Name: Anonymous 2013-07-28 19:54

thank

Name: Anonymous 2013-07-28 19:54

you

Name: Anonymous 2013-07-28 19:54

>>85-san

Name: Anonymous 2013-07-29 5:50

>>71
Increasing state space might help with entropy.
The state space of transitions from byte to byte is 1 bit(from zero-initial to one-initial for 1bit comparisions). If you increase the state space to more bits it would be like this 2bit transition states.
examples:state [xx...] where x=1 signify that change  in that position occurs
00:to:00: state 00(no change)
00:to:01: state 01(rightbit change)
00:to:10: state 10(leftbit change)
00:to:11: state 11(twobit change)

Don't change these.
Name: Email:
Entire Thread Thread List