Results 1 to 7 of 7

Thread: phafre

  1. #1
    Member
    Join Date
    Dec 2012
    Location
    japan
    Posts
    149
    Thanks
    30
    Thanked 59 Times in 35 Posts

    phafre

    phafre uses sixpack's routine. it's similar to huffman coding.
    Code:
    To compress
        phafre c[#1,#2,#3,#4] infile outfile
        #1 0..3    context order. default is 2
        #2 0..15   increment of symbol frequency
        #3 0..255  max frequency count(# x 30)
        #4 0..4000 max memsize. #+1 MBytes. default is 1000
        if those are empty or not number, gives auto value.
    Example for compress
        phafre c in out
        phafre c2,4,30 in out
        phafre c1,a,a,100 in out
        phafre c,,,200 in out
    
    
     To decompress: phafre d infile outfile
    Attached Files Attached Files

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

    surfersat (28th September 2014)

  3. #2
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    323
    Thanks
    174
    Thanked 51 Times in 37 Posts
    Quck test results:

    Code:
    enwik8   34,309,237  c3,15,0,4000
    SFC.tar  18,998,259  c3,15,0,4000
    Last edited by comp1; 28th September 2014 at 06:42.

  4. The Following User Says Thank You to comp1 For This Useful Post:

    xezz (28th September 2014)

  5. #3
    Member
    Join Date
    Dec 2012
    Location
    japan
    Posts
    149
    Thanks
    30
    Thanked 59 Times in 35 Posts
    compression is improved a little.
    Attached Files Attached Files

  6. #4
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    323
    Thanks
    174
    Thanked 51 Times in 37 Posts
    Slightly better on enwik8 and slightly worse on SFC corpus.

    Code:
    enwik8   34,293,837  c3,15,0,4000
    SFC.tar  19,043,499  c3,15,0,4000

  7. #5
    Member
    Join Date
    Dec 2012
    Location
    japan
    Posts
    149
    Thanks
    30
    Thanked 59 Times in 35 Posts
    Thanks! v0.3's optimazaiton is better for small files whene order is higher.

  8. #6
    Member
    Join Date
    Jun 2018
    Location
    Slovakia
    Posts
    80
    Thanks
    22
    Thanked 3 Times in 3 Posts
    I´ve tested phafre0.3 with maximal possible compression settings to compress 93 MB hexadecimal testfile, but ratio is only 53%. Are there any plans to new version?

  9. #7
    Member
    Join Date
    Dec 2012
    Location
    japan
    Posts
    149
    Thanks
    30
    Thanked 59 Times in 35 Posts

    v2.0

    if argument is nothing, usage is printed.
    Attached Files Attached Files

Posting Permissions

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