Git Product home page Git Product logo

compress's Introduction

huffman.ml

This is a encoding-decoding program for losslessly compressing text files.

Usage example:

This is an example of encoding and decoding an HTML file.

huffman〉dune build
huffman〉dune install
huffman〉huffman encode jpbb.html jpbb.html.huf
0.623 ms <- encode.freqs
0.080 ms <- encode.huffman
0.016 ms <- encode.sort
48.696 ms <- encode.to_code
50.089 ms <- encode
huffman〉huffman decode jpbb.html.huf jpbb.html.huf.decoded
0.004 ms <- decode.build_dict
246.918 ms <- decode.decode
247.266 ms <- decode
huffman〉ls jpbb*
╭───┬───────────────────────┬──────┬──────────┬────────────╮
│ # │         name          │ type │   size   │  modified  │
├───┼───────────────────────┼──────┼──────────┼────────────┤
│ 0 │ jpbb.html             │ file │ 310.6 KB │ 5 days ago │
│ 1 │ jpbb.html.huf         │ file │ 213.5 KB │ now        │
│ 2 │ jpbb.html.huf.decoded │ file │ 310.6 KB │ now        │
╰───┴───────────────────────┴──────┴──────────┴────────────╯
huffman〉diff -s jpbb.html jpbb.html.huf.decoded
Files jpbb.html and jpbb.html.huf.decoded are identical

compress's People

Contributors

jkenda avatar

Watchers

 avatar

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.