About The Algorithms
Chameleon ( DENSITY_ALGORITHM_CHAMELEON) Chameleon is a dictionary lookup based compression algorithm. It is designed for absolute speed and usually reaches a 60% compression ratio on compressible data.Decompression is just as fast.
This algorithm is a great choice when main concern is speed.
Cheetah ( DENSITY_ALGORITHM_CHEETAH) Cheetah was develop.
,
Apis
DENSITY features a straightforward API, simple yet powerful enough to keep users' creativity unleashed.
For advanced developers, it allows use of custom dictionaries and exportation of generated dictionaries after a compression session.
Although using the default, blank dictionary is perfectly fine in most cases, setting up your own, tailored dicti.
,
Benchmarks
Quick benchmark DENSITY features an integrated in-memory benchmark.
After building the project (see build), a benchmarkexecutable will be present in the build directory.
If run without arguments, usage help will be displayed.
File used : enwik8 (100 MB) Platform : MacBook Pro, MacOS 10.13.3, 2.3 GHz Intel Core i7, 8Gb 1600 MHz DDR, SSD, compiling w.
,
Build
DENSITY can be built on a number of platforms, via the provided makefiles.
It was developed and optimized against Clang/LLVM which makes it the preferred compiler, but GCC and MSVC are also supported.
Please use the latest compiler versions for best performance.
MacOS On MacOS, Clang/LLVM is the default compiler, which makes things simpler.
1) Get .
,
How can compression be optimized for specific types of data?
The compression can be optimized for specific types of data.
If one is using the library to always compress specific types of data, then using a specific strategy may improve compression and performance.
For example, if the data contain long lengths of repeated bytes, the run-length encoding (RLE) strategy may give good results at a higher speed.
,
How to decompress a compressed string of data?
You can easily decompress a compressed string of data using the decompress function.
It also supports decompressing large data streams as well as compressed data contained in a file. zlib – An open source free C data compression library to create archiver that enables computer programmers to compress and decompress your data and data.
,
Output Format
DENSITY outputs compressed data in a simple format, which enables file storage and optional parallelization for both compression and decompression.
A very short header holding vital informations (like DENSITY version and algorithm used) precedes the binary compressed data.
,
Quick Start
Using DENSITY in your application couldn't be any simpler.
First you need to include this file in your project : 1. density_api.h When this is done you can start using the DENSITY API: And that's it ! We've done a compression/decompression round trip with a few lines !
,
What is zlib free data compression C?
The zlib open source free data compression C library enables computer programmers to create an archiver for working with compression file formats inside their own applications.
It is a lossless data-compression library for use on virtually any computer hardware and operating system.
,
Why are most compression libraries written in C?
Looks like I should have made that an answer, I'm missing out on reputation! Most compression libraries that I know of are written in C for two reasons:
- one
- the general age of good compression algorithms; and two
- the high portability (and stability) of C across platforms
,
Why Is It So Fast ?
One of the biggest assets of DENSITY is that its work unit is not a byte like other libraries, but a group of 4 bytes.
When other libraries consume one byte of data and then apply an algorithmic processing to it, DENSITY consumes 4 bytes and then applies its algorithmic processing.
That's why DENSITY's algorithms were designed from scratch.
They ha.