Code Monkey home page Code Monkey logo

Comments (2)

richox avatar richox commented on September 16, 2024
$ time ./C-Programming/Huffman/Huffman/yykhf test/enwik8 enwik8
enwik8.yykhf has been generated

real	0m1.848s
user	0m1.503s
sys	0m0.195s

$ time ./C-Programming/Huffman/Huffman/unyykhf enwik8.yykhf enwik8.1
enwik8.1 has been generated

real	0m1.710s
user	0m1.465s
sys	0m0.211s

$ time ./target/release/orz encode -l0 test/enwik8 enwik8.orz
[INFO] encode: 16777216 bytes => 4789252 bytes, 18.769MB/s
[INFO] encode: 16777216 bytes => 4660591 bytes, 18.796MB/s
[INFO] encode: 16777216 bytes => 4688862 bytes, 19.106MB/s
[INFO] encode: 16777216 bytes => 4699851 bytes, 19.235MB/s
[INFO] encode: 16777216 bytes => 4690410 bytes, 19.292MB/s
[INFO] encode: 16113920 bytes => 4496558 bytes, 19.325MB/s
[INFO] statistics:
[INFO]   size:  100000000 bytes => 28025726 bytes
[INFO]   ratio: 28.03%
[INFO]   time:  5.191 sec

real	0m5.221s
user	0m5.049s
sys	0m0.101s

$ time ./target/release/orz decode enwik8.orz enwik8.2
[INFO] decode: 16777216 bytes <= 4789252 bytes, 67.899MB/s
[INFO] decode: 16777216 bytes <= 4660591 bytes, 67.666MB/s
[INFO] decode: 16777216 bytes <= 4688862 bytes, 69.224MB/s
[INFO] decode: 16777216 bytes <= 4699851 bytes, 70.169MB/s
[INFO] decode: 16777216 bytes <= 4690410 bytes, 70.177MB/s
[INFO] decode: 16113920 bytes <= 4496558 bytes, 68.906MB/s
[INFO] statistics:
[INFO]   size:  100000000 bytes <= 28025726 bytes
[INFO]   ratio: 28.03%
[INFO]   time:  1.456 sec

real	0m1.484s
user	0m1.338s
sys	0m0.087s

$ ll enwik8.orz enwik8.yykhf
-rw-r--r-- 1 rich 28025726  2 26 23:09 enwik8.orz
-rw-r--r-- 1 rich 63863778  2 26 23:08 enwik8.yykhf

from orz.

richox avatar richox commented on September 16, 2024

对于文本/通用数据的压缩,Huffman算法需要配合LZ、BWT等编码算法才能发挥价值,直接用Huffman算法的压缩率很低,速度也没有优势。

from orz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.