Matt Mahoney's compressor compressed Mark Nelson's file that I posted that can't be compressed.

This was after using my sorting algorithm on the file. This did not work with ZIP.

Why did this work?

Did sorting the file create patterns?

paq8px -8 random.dat

This was before sorting the file got larger.

Total input size : 415248

Total archive size : 415403

paq8px -8 randomsorted.bin

This was after sorting the file got 96k smaller.

Total input size : 415248

Total archive size : 319429

I added 7 zero's to the end of the random.dat file because of my sorting algorithm.

It sorts in 8 byte blocks. 8 x 51906 = 415248. The original file size was 415241.

His bbb and paq9a compressor also worked.

More testing is needed. I still have to unsort the file.

Here's the sorting algorithm.

Code: Select all

```
'sorting a random data file by neil
DIM AS UBYTE a,b,c,d,e,f,g,h,nr
Dim As UShort i
open "random.dat" FOR INPUT AS #1
open "randomsorted.bin" FOR BINARY AS #2
for i = 1 to 51906
get #1,,a
get #1,,b
get #1,,c
get #1,,d
get #1,,e
get #1,,f
get #1,,g
get #1,,h
for nr = 1 to 8
if a >= b THEN swap a,b
if b >= c THEN swap b,c
if c >= d THEN swap c,d
if d >= e THEN swap d,e
if e >= f THEN swap e,f
if f >= g THEN swap f,g
if g >= h THEN swap g,h
next
put #2,,a
put #2,,b
put #2,,c
put #2,,d
put #2,,e
put #2,,f
put #2,,g
put #2,,h
next
close #1
close #2
print "Done"
sleep
```

Here's some links to the paq8px compressor.

Windows

https://drive.google.com/file/d/1UY0ydz ... vilmB/view
Windows

https://encode.su/attachment.php?attach ... 1683741419
Linux

https://github.com/hxim/paq8px