Message board for the users of flat assembler.
> Projects and Ideas > I wrote fast LZ-type 64-bit compressor
SergeASM 13 Jun 2017, 13:04
I wrote in FASM small OS independed 64-bit procedures for compress/uncompress RAM-RAM "on the fly". The procedures all working data store in registers. Both can be multi-call/thread-safe and can be stored in ROM at any address.
Here you can download my small and simple program for Win64, which compress/uncompress given file:
The file can have size from 0 to unlimited. Note:
1. Your CPU should support AVX instructions set.
2. For large files you must have ~1Gb free memory for compression, and ~2Gb for uncompression. (Generally speaken its not necessary: the program can be compiled to read smaller pieces of data.)
3. The program does not calculate and store check sum.
4. The program does not save file attributes in archive.
5. The program rewrites files without prompt.
6. After (un)compress the program shows working time in ms by GetTickCount.
Authors of compression programs often uses file enwik8 (100 million bytes length) for testing. Its a piece of Englich Wikipedia in XML format. You can download it from
On Intel I3 5005U 2GHz with RAM 1.6 GHz my program compresses enwik8 in 0.8 s., and uncompresses in 0.42 s. Compression ratio ~ 52%.
ren enwik8 enwik8_1
fc /b enwik8 enwik8_1
No differences encountered.
My program is similar to lz4 by Yann Collet in fast (simple hash) mode:
But my program uses hash table of 512 K cells 8 bytes each...
Also you can find other similar projects: QuickLZ, Snappy by Google...
Is someone interested in my procedures, or I'm wasting my time?
Sorry for poor English.
|13 Jun 2017, 13:04||
revolution 13 Jun 2017, 13:54
So your code takes enwik8 and creates enwik8.lz4i? And later your code auto-uncompresses the data from enwik8.lz4i? How does your code determine whether to compress or uncompress?
|13 Jun 2017, 13:54||
SergeASM 14 Jun 2017, 07:28
If the given file name ends on .lz4i then my code uncompress the file, otherwise compress it. For simple example to demonstrate my subroutines its enough.
|14 Jun 2017, 07:28||
komoco 27 Sep 2017, 05:00
And where is the souce code?
|27 Sep 2017, 05:00||
SergeASM 15 Oct 2017, 08:16
At this time I'm working on a new fast & quick pure LZ file compressor by my idea. I hope over time I will finalize this LZ4 like compressor and will publish source code.
|15 Oct 2017, 08:16||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.