Results 1 to 9 of 9

Thread: TinyLZP - A very simple LZP compressor

  1. #1
    Member
    Join Date
    Aug 2011
    Location
    Canada
    Posts
    113
    Thanks
    9
    Thanked 22 Times in 15 Posts

    TinyLZP - A very simple LZP compressor

    I've just recently developed a very simple LZP compressor (around 100 lines of code for compression/decompression) and so I'm releasing it for anyone who wants a simplified LZP. It moves at around 80mb/s on my laptop, although it's compression ratios are bad (even for its speed class). The source code and both 32 and 64 bit executables are included in this release.

    Also, if anyone has any suggestions on improving it I'll try to include them in subsequent releases. I'm also okay with anyone who wants to modify the code and post the modified versions.



    Initial Benchmarks:

    calgary.tar - 2,240,413 bytes (71.1%) - 0.047 seconds
    enwik8 - 79,220,546 bytes (79.2%) - 1.419 seconds
    Attached Files Attached Files
    Last edited by david_werecat; 13th October 2012 at 17:04.

  2. #2
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    Congratulations. It just edges out my BARF recursive compressor http://mattmahoney.net/dc/text.html

    I wasn't able to get any of the supplied executables to run under 32 bit Vista (Can't load MSVCR110.dll) so I recompiled using Visual C++ with "cl /O2 tinylzp.c /I." gcc gives compiler errors because it doesn't understand _inline or INLINE.

  3. #3
    Member
    Join Date
    Aug 2011
    Location
    Canada
    Posts
    113
    Thanks
    9
    Thanked 22 Times in 15 Posts
    Lots of competition for that 159th spot . Thanks for testing it, though.

    Also, do you know of any compiler independent way of creating inline functions?

  4. #4
    Member m^2's Avatar
    Join Date
    Sep 2008
    Location
    Ślůnsk, PL
    Posts
    1,612
    Thanks
    30
    Thanked 65 Times in 47 Posts
    Quote Originally Posted by david_werecat View Post
    Lots of competition for that 159th spot . Thanks for testing it, though.

    Also, do you know of any compiler independent way of creating inline functions?
    Yes, 'inline'. In C99.
    ADDED: Beware, it has different semantics than C++ one.
    Last edited by m^2; 12th October 2012 at 22:44.

  5. #5
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    g++ -O3 will usually inline small functions anyway.

  6. #6
    Tester
    Black_Fox's Avatar
    Join Date
    May 2008
    Location
    [CZE] Czechia
    Posts
    471
    Thanks
    26
    Thanked 9 Times in 8 Posts
    Quote Originally Posted by Matt Mahoney View Post
    I wasn't able to get any of the supplied executables to run under 32 bit Vista (Can't load MSVCR110.dll) so I recompiled using Visual C++
    http://www.microsoft.com/en-us/downl....aspx?id=30679 this should help
    I am... Black_Fox... my discontinued benchmark
    "No one involved in computers would ever say that a certain amount of memory is enough for all time? I keep bumping into that silly quotation attributed to me that says 640K of memory is enough. There's never a citation; the quotation just floats like a rumor, repeated again and again." -- Bill Gates

  7. #7
    Member
    Join Date
    May 2008
    Location
    HK
    Posts
    160
    Thanks
    4
    Thanked 25 Times in 15 Posts
    INLINE should be defined to either "inline" or "__inline" for gcc/tinycc compilation.

  8. #8
    Member
    Join Date
    Aug 2011
    Location
    Canada
    Posts
    113
    Thanks
    9
    Thanked 22 Times in 15 Posts
    I re-uploaded the packages to include a gcc/tcc compatible inline.

  9. #9
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    Yes, the supplied .exe files run now with VC++ 2012 runtime installed.

    Edit: I redid the test because the supplied .exe was faster than my compile. http://mattmahoney.net/dc/text.html#6942
    Last edited by Matt Mahoney; 15th October 2012 at 03:28.

Similar Threads

  1. lzp question
    By sourena in forum Data Compression
    Replies: 4
    Last Post: 5th February 2012, 18:24
  2. Kwc – very simple keyword compressor
    By Sportman in forum Data Compression
    Replies: 10
    Last Post: 20th January 2010, 17:06
  3. LZP flag sequence compression
    By Shelwien in forum Data Compression
    Replies: 8
    Last Post: 9th August 2009, 02:08
  4. flzp, new LZP compressor/preprocessor
    By Matt Mahoney in forum Data Compression
    Replies: 13
    Last Post: 23rd June 2008, 17:24
  5. FLASHZIP new ARI+LZP compressor
    By Nania Francesco in forum Forum Archive
    Replies: 65
    Last Post: 5th February 2008, 22:42

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
  •