Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pure C3 inflate library (inflate, gzip, zlib)

konimarti/tinf.c3l

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C3 Inflate library (inflate, gzip, zlib)

Implementation of the decompression algorithm for the deflate compressed data format (called 'inflate'). Ported from tinf.

API overview:

// inflate
import tinf::inflate;
fn void? uncompress(char[] dst, char[] src)

// gzip
import tinf::gzip;
fn void? uncompress(char[] dst, char[] src)

// zlib
import tinf::zlib;
fn void? uncompress(char[] dst, char[] src)

Run the unit tests with c3c test from the project root.

Installation

Clone the repository with git clone http://github.com/konimarti/tinf.c3l to the ./lib folder of your C3 project and add the following to project.json:

{
    "dependency-search-paths": [ "lib" ],
    "dependencies": [ "tinf" ]
}

If you didn't clone it into the lib folder, adjust your dependency-search-paths accordingly.

Example: gunzip

Build gunzip: c3c build gunzip

Test it:

$ echo "hello" > zipped
$ gzip zipped
$ build/gunzip < zipped.gz
hello

About

Pure C3 inflate library (inflate, gzip, zlib)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published