Git Product home page Git Product logo

compression-tool's Introduction

Compression tool (Simone SOS)

This tool implements the challenge at https://codingchallenges.fyi/challenges/challenge-huffman

Binary format

The files produced by the tool will adhere to the following specifications:

  1. The file starts with a dynamic-sized header that contains the required information to build a mapping between source text bytes and encoded bit sequences.
  2. The remaining bytes represent the encoded source text.

Header format

The header encodes a sequence of entries representing the couple byte and encoded symbol, the first byte of the header represents the number of entries hereby contained. The byte is written as-is, while the symbol is encoded in the following way:

  1. Symbol size is dynamic, so the first byte of the symbol is the number of bits used to encode the symbol, say n.
  2. The subsequent n bits are the symbol itself.

An entry could be:

    / Byte from the source text
   /         / Number of bits in the encoded symbol
  /         /         ------------------ The encoded symbol
 /         /         /        /
00001010 00010000 11101010 00001000 

compression-tool's People

Contributors

mattia-fumo avatar malta895 avatar simoscarano avatar

Watchers

 avatar  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.