Results 1 to 3 of 3

Thread: My Win64 example like lz4 in FASM (6.5 Kb in exe file!)

  1. #1
    Member lz77's Avatar
    Join Date
    Jan 2016
    Location
    Russia
    Posts
    46
    Thanks
    14
    Thanked 11 Times in 7 Posts

    Smile My Win64 example like lz4 in FASM (6.5 Kb in exe file!)

    Hi all,

    I wrote a small program for Win64 to demonstrate my subroutines for fast compression/uncompresion with simple hash. Download it here:
    http://www.cronc.com/lz4i64.zip

    Note:
    1. Your CPU should support AVX instructions set. (Yes, my code uses XMM register to calculate 4 hashes at once. But it accelerates compression on 5% ).
    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.

    On a CPU 2GHz and RAM 1.6 GHz my program compresses enwik8 (the file for puzomerka) in 0.8 s., and uncompresses in 0.42 s. Compression ratio ~ 52%. My code creates hash table of 512 K cells 8 bytes each, its not so good...

    For example:

    lz4i64.exe enwik8 (compress enwik8 -> enwik8.lz4i)
    ren enwik8 enwik8_1
    lz4i64.exe enwik8.lz4i (uncompress enwik8.lz4i -> enwik8 )
    fc /b enwik8 enwik8_1
    No differences encountered.

    Wow!

    My subroutines are OS independed, they do not use memory/stack, and all work data store in registers.

    What do you think? May be I'm simple wasting my time?

  2. The Following User Says Thank You to lz77 For This Useful Post:

    snowcat (16th June 2017)

  3. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,134
    Thanks
    179
    Thanked 921 Times in 469 Posts
    Well, here's a pseudo-C version.
    Otherwise, looks scary - too much code for asm, why that AVX is even there, etc.
    Attached Files Attached Files

  4. #3
    Member lz77's Avatar
    Join Date
    Jan 2016
    Location
    Russia
    Posts
    46
    Thanks
    14
    Thanked 11 Times in 7 Posts
    My FASM source looks a little more beautiful.

Similar Threads

  1. Seeking Right click md5 & sha calc/verified for win64
    By SvenBent in forum The Off-Topic Lounge
    Replies: 4
    Last Post: 12th January 2015, 22:04
  2. New LZ4 vulnerability - to be checked
    By Cyan in forum Data Compression
    Replies: 2
    Last Post: 3rd July 2014, 09:18
  3. RP ARSEiever compresses any set of data to 4 Kb
    By ARSEiever in forum Data Compression
    Replies: 10
    Last Post: 2nd April 2013, 07:05
  4. 7zip >> Sfx optimized - 23,7 kb
    By Yuri Grille. in forum Data Compression
    Replies: 22
    Last Post: 12th April 2009, 21:33
  5. QuickLZ 1.50 prototype (win64 only)
    By Lasse Reinhold in forum Data Compression
    Replies: 3
    Last Post: 16th May 2008, 03:16

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •