Page 1 of 3 123 LastLast
Results 1 to 30 of 71

Thread: LZC - new fastr LZ coder compressor -

  1. #1
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    LZC v.0.01
    LZCode file compressor/archiver
    By Nania Francesco Antonio(Italy)
    Copyright © 2007 . All rights reserved.

    To compress: lzc c mode in out
    To decompress: lzc d input
    options:
    1= 128 MB to compress 2MB to decompress
    2= 256 MB to compress 4MB to decompress
    3= 512 MB to compress 8MB to decompress
    4= 1 GB to compress 16MB to decompress
    Total Memory = Merory mode + 100 MB
    (LZ:ROLZ:LZP:LZMA) vs LZC
    LZMA = best POSITION for best LENGTH;
    LZ:ROLZ:LZP = POSITION + LENGTH;
    LZC= BEST CODE for best POSITION & LENGHT

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    like me, you forget to include download url

    as i already said in rissuin, i fell nyself like i started arms race

  3. #3
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,954
    Thanks
    359
    Thanked 332 Times in 131 Posts
    Link:
    LZC.zip (9 KB)



    However, I'm not really understand what is LZC? Actually, COMPRESS uses the LZC algorithm (LZW with flat binary codes).


  4. #4
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    thanks, encode! i also interested in knowuing details, but it may be hard for Nania to describe it. may be you can show some (pseudo)code?

  5. #5
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    unfortunately my English is not optimal! LZC as you have been able to see is one my invention that I want guardian (All rights reserved) and I cannot reveal a pseudo-code to you! however considered approval and that it is Encode that Bulat is very great computer programmers I can only say if you are interested to one production with of the program? All why in the first place this is they puts into effect it simple bit encoder !!
    int decode()
    {
    int y;if (bitto==0) ogge=getc(in);y=(ogge>>(7-bitto))&1;
    bitto++;if (bitto== bitto=0;
    return y;
    }
    void encode(int y)
    {
    ogge+=(y<<(7-bitto));
    bitto++;
    if (bitto=={putc(ogge,out);ogge=0;tot++;bitto=0;}
    }
    I only say you that theoretically in enwik8 and enwik9 30-32 MB could be arrived with the computer used from Matt to these turns out to you ENWIK8 20 sec ENWIK9 245-250 MB in 200 sec If you want to co-produce this Encode program has my email contact me!

  6. #6
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,954
    Thanks
    359
    Thanked 332 Times in 131 Posts
    Probably, LZC indeed uses LZC algo. Just try to "compress" A10.jpg, and see how it inflates. The worst case with LZW is that file can be inflated by ~125...150%. However, LZW shouldn't use such amounts of memory. Maybe the catch in implementation.

    LZC is well known modification of LZW. IMHO, this algo is crap in all terms - compression and speed even with best and very clever implementation. LZP with byte aligned output can provide much higher compression and speed.

    Anyway, some info about LZW/LZC:

    The output of the LZW consists of only the codes of phrases.

    Initially, dictionary contains all one-byte phrases - from 0 to 255, so we able to code any byte from input.

    During compression/decompression, coder adds a new phrases to the dictionary. Example of the dictionary:
    0 - 0
    ...
    255 - 255
    256 - "ab"
    257 - "ba"
    258 - "abc"
    ...
    At each step, encoder firstly checks, is dictionary contains current phrase? If it does, encoder moves to the next byte, and again checks... until new phrase will be found. After it adds this new phrase to the dictionary, and outputs code corresponding to the longest phrase found.

    The baseline LZW uses fixed length codes. For example, if we have dictionary with 65536 entries it will use an 16-bit codes.

    The LZC, modification of the LZW uses flat binary codes. Like I said, initially, LZW contains only 256 phrases, after each step dictionary will grow up. For example, if we have, 256 phrases we can encode a codewords using 8-bits, if we have 512 or less phrases we can encode a codewords using 9-bits, and so on. In other words, the code size will grow up according the the actual dictionary size.

    Another thing, is called LZW-ARI. Instead of coding codewords with flat binary codes, we can use a flat arithmetic coder - all codes have the same probabliliry, but the alphabet size is increased according to the dictionary size.

    In addition, here we have a few ways, what to do if dictionary becomes full:
    + Froze the dictionary (As with original LZW)
    + Reset the dictionary
    + Froze the dictionary while we get descent compression, after reset the dictionary and drop the special RESET codeword, so, decoder will also resets the dictionary syncronously.

    Note that, some time ago I implemented all variations of things described above, including LZW-ARI. The conclusion - it's not worth it. In 80's LZW was very popular, but today...

  7. #7
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,954
    Thanks
    359
    Thanked 332 Times in 131 Posts
    Quote Originally Posted by LZARI.C
    void PutBit(int bit) /* Output one bit (bit = 0,1) */
    {
    static unsigned int buffer = 0, mask = 128;

    if (bit) buffer |= mask;
    if ((mask >>= 1) == 0) {
    if (putc(buffer, outfile) == EOF) Error("Write Error");
    buffer = 0; mask = 128; codesize++;
    }
    }

    void FlushBitBuffer(void) /* Send remaining bits */
    {
    int i;

    for (i = 0; i < 7; i++) PutBit(0);
    }

    int GetBit(void) /* Get one bit (0 or 1) */
    {
    static unsigned int buffer, mask = 0;

    if ((mask >>= 1) == 0) {
    buffer = getc(infile); mask = 128;
    }
    return ((buffer & mask) != 0);
    }

  8. #8
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Thanks Nania and Ilia!

    Mirror: Download

  9. #9
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    Quote Originally Posted by Nania Francesco Antonio
    unfortunately my English is not optimal!
    unlike your encoding

    if you want to keep this in secret, lets do. 10 years ago i thought in the same direction, then i realized that noone is really interested in kidnapping my ideas

  10. #10
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,954
    Thanks
    359
    Thanked 332 Times in 131 Posts
    Today, it's impossible to invent something really new. A couple of VERY smart people already invented all things that can be invented. All new stuff (including LZPM) is just varitions of already invented things.


  11. #11
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    Quote Originally Posted by Nania Francesco Antonio
    if you are interested to one production with of the program?
    i dont really understand your question but guess you are asking why we are so interested. the answer is that i try to uderstand each new idea, because the new methods typically come in long way through the different people

  12. #12
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    encode
    he doesn't say anything about lzw, so it seems that his LZC method has nothing common with lz78 family - ?????? ????????? ?????????? ????

  13. #13
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    Quote Originally Posted by Nania Francesco Antonio
    int decode()
    it is very inefficient ones. try smth like this:

    unsigned word, buf[SIZE],*p=buf;

    encode(int bit)
    {
    if word>(unsigned)INT_MAX
    {
    *p++ = word*2+bit;
    if (p==buf+SIZE) write(outfile,buf,SIZE),p=buf;
    word = 1;
    }
    else word = word*2+bit;
    }

    you can find efficient byte and bit codecs in my tornado

  14. #14
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    I do not understand why created you these problems! If you want to collaborate with me to the program I put you to coded disposition source and you with your acquaintances could carry it to highest levels! I cannot put it open source!

  15. #15
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Quick test...

    Test Machine = AMD Sempron 2400+


    MC SFC test:

    LZC v0.01 (c 1)

    A10.jpg > 1,031,362
    AcroRd32.exe > 2,111,485
    english.dic > 1,463,803
    FlashMX.pdf > 4,766,274
    FP.LOG > 2,356,353
    MSO97.DLL > 2,611,910
    ohs.doc > 1,332,228
    rafale.bmp > 1,230,813
    vcfiu.hlp > 1,337,130
    world95.txt > 1,229,658

    Total = 19,471,016 bytes


    LZC v0.01 (c 2)

    A10.jpg > 1,098,426
    AcroRd32.exe > 2,144,834
    english.dic > 1,485,304
    FlashMX.pdf > 5,109,660
    FP.LOG > 2,140,932
    MSO97.DLL > 2,640,523
    ohs.doc > 1,344,601
    rafale.bmp > 1,192,465
    vcfiu.hlp > 1,334,946
    world95.txt > 1,126,751

    Total = 19,618,442 bytes


    LZC v0.01 (c 3)

    A10.jpg > 1,163,805
    AcroRd32.exe > 2,176,164
    english.dic > 1,508,219
    FlashMX.pdf > 5,415,506
    FP.LOG > 1,980,300
    MSO97.DLL > 2,664,911
    ohs.doc > 1,358,091
    rafale.bmp > 1,173,044
    vcfiu.hlp > 1,332,897
    world95.txt > 1,039,116

    Total = 19,812,053 bytes


    LZC v0.01 (c 4)

    A10.jpg > 1,165,182
    AcroRd32.exe > 2,195,158
    english.dic > 1,529,820
    FlashMX.pdf > 5,649,854
    FP.LOG > 1,857,545
    MSO97.DLL > 2,672,681
    ohs.doc > 1,359,406
    rafale.bmp > 1,171,400
    vcfiu.hlp > 1,335,544
    world95.txt > 977,330

    Total = 19,913,920 bytes



    ENWIK8:

    LZC v0.01 (c 1)
    Compressed Size = 45,940,785 bytes
    Compression Time = 00:00:56.328

    LZC v0.01 (c 2)
    Compressed Size = 43,940,908 bytes
    Compression Time = 00:00:55.187

    LZC v0.01 (c 3)
    Compressed Size = 42,085,698 bytes
    Compression Time = 00:00:54.609

    LZC v0.01 (c 4)
    Compressed Size = 40,312,925 bytes
    Compression Time = 00:00:54.156

  16. #16
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Thanks Love Pimple!

  17. #17
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Good work Nania!

    It would be nice if you could make changes to prevent "a10.jpg" from inflating for the next version.

  18. #18
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    Quote Originally Posted by Nania Francesco Antonio
    I do not understand why created you these problems! If you want to collaborate with me to the program I put you to coded disposition source and you with your acquaintances could carry it to highest levels! I cannot put it open source!
    no problems. i tried to help you with better bit coder, if you interested. if you dont want to talk about lzc - its also ok

  19. #19
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Thanks for the aid Bulat indeed! If you have interest my offer is always valid !
    contact me email : miadebora@hotmail.it

  20. #20
    Member
    Join Date
    Mar 2007
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Nania Francesco Antonio
    LZC= BEST CODE for best POSITION & LENGHT
    I checked the results posted by LovePimple and I think we must have different definitions of "BEST".

  21. #21
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    LZC v.0.02 Copyright © 2007 . All rights reserved.
    INSTRUCTIONS
    *- better compression; more faster in compression (30-60%)

  22. #22
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Nania Francesco Antonio
    LZC v.0.02 Copyright © 2007 . All rights reserved.
    INSTRUCTIONS
    *- better compression; more faster in compression (30-60%)
    Excellent! Can you upload it to www.mytempdir.com for us?

  23. #23
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts

  24. #24
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Thank You Nania!

    Mirror: Download

  25. #25
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    I now hope not to receive too many critics! but I will very still improve I hope! Hi Love Pimple!

  26. #26
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Quick test...

    Test Machine = AMD Sempron 2400+


    MC SFC test:

    LZC v0.02 (c 1)

    A10.jpg > 941,077
    AcroRd32.exe > 2,107,258
    english.dic > 1,457,323
    FlashMX.pdf > 4,413,711
    FP.LOG > 2,345,553
    MSO97.DLL > 2,605,475
    ohs.doc > 1,329,302
    rafale.bmp > 1,228,207
    vcfiu.hlp > 1,336,992
    world95.txt > 1,221,845

    Total = 18,986,743 bytes


    LZC v0.02 (c 2)

    A10.jpg > 941,077
    AcroRd32.exe > 2,084,200
    english.dic > 1,432,492
    FlashMX.pdf > 4,413,711
    FP.LOG > 2,065,918
    MSO97.DLL > 2,564,459
    ohs.doc > 1,308,825
    rafale.bmp > 1,153,992
    vcfiu.hlp > 1,298,403
    world95.txt > 1,087,131

    Total = 18,350,208 bytes


    LZC v0.02 (c 3)

    A10.jpg > 941,077
    AcroRd32.exe > 2,081,897
    english.dic > 1,429,189
    FlashMX.pdf > 4,413,711
    FP.LOG > 1,879,234
    MSO97.DLL > 2,545,498
    ohs.doc > 1,300,824
    rafale.bmp > 1,116,936
    vcfiu.hlp > 1,277,312
    world95.txt > 986,338

    Total = 17,972,016 bytes


    LZC v0.02 (c 4)

    A10.jpg > 941,077
    AcroRd32.exe > 2,084,574
    english.dic > 1,438,347
    FlashMX.pdf > 4,413,711
    FP.LOG > 1,749,127
    MSO97.DLL > 2,533,721
    ohs.doc > 1,296,347
    rafale.bmp > 1,107,043
    vcfiu.hlp > 1,270,536
    world95.txt > 921,471

    Total = 17,755,954 bytes


    ENWIK8:

    LZC v0.02 (c 1)
    Compressed Size = 45,639,272 bytes
    Compression Time = 00:00:31.093

    LZC v0.02 (c 2)
    Compressed Size = 42,353,016 bytes
    Compression Time = 00:00:33.093

    LZC v0.02 (c 3)
    Compressed Size = 39,882,915 bytes
    Compression Time = 00:00:35.156

    LZC v0.02 (c 4)
    Compressed Size = 37,906,466 bytes
    Compression Time = 00:00:38.203


    thortest.tar:

    LZC v0.02 (c 1)
    Compressed Size = 354,321,859 bytes
    Compression Time = 00:03:43.546

  27. #27
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,954
    Thanks
    359
    Thanked 332 Times in 131 Posts
    Link:
    lzc002.zip (9 KB)


  28. #28
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Thanks Encode!

  29. #29
    Member Vacon's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    523
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello everyone,

    Quote Originally Posted by Nania Francesco Antonio
    I now hope not to receive too many critics! but I will very still improve
    This is my first posting here and I decided to register *not* to educate anyone, but to support the hard work that most posters sometimes suffer from.
    You seem to be irritated by some comments that deal with your compressors, but I *really believe* that the comments you get shall help you to improve your efforts! So *please* do not take them as offense, but as support!
    I, and as I read nearly anyone commenting your postings, like your work, and consider it worthy to deal with and help you to improve.

    Best regards!

  30. #30
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    LZC v.0.03

    Excuse me! corrected bugs on LZC v.0.02!

Page 1 of 3 123 LastLast

Similar Threads

  1. How fast should be a range coder ?
    By Cyan in forum Data Compression
    Replies: 33
    Last Post: 16th November 2009, 17:02
  2. LZC Question
    By moisesmcardona in forum Data Compression
    Replies: 3
    Last Post: 16th August 2009, 22:33
  3. A weird order8(?) CM coder
    By Shelwien in forum Data Compression
    Replies: 1
    Last Post: 23rd July 2009, 21:08
  4. LZC Compressor GPL
    By Nania Francesco in forum Data Compression
    Replies: 1
    Last Post: 15th September 2008, 05:26
  5. LZWA vs. LZC
    By encode in forum Forum Archive
    Replies: 8
    Last Post: 16th July 2006, 18:37

Posting Permissions

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