|
libmobi
C library for handling MOBI format ebook documents
|
Functions handling compression. More...
#include <string.h>#include "compression.h"#include "buffer.h"#include "mobi.h"#include "debug.h"Functions | |
| MOBI_RET | mobi_decompress_lz77 (unsigned char *out, const unsigned char *in, size_t *len_out, const size_t len_in) |
| Decompressor fo PalmDOC version of LZ77 compression. More... | |
| MOBI_RET | mobi_decompress_huffman (unsigned char *out, const unsigned char *in, size_t *len_out, size_t len_in, const MOBIHuffCdic *huffcdic) |
| Decompressor for huff/cdic compressed text records. More... | |
Functions handling compression.
Copyright (c) 2014 Bartek Fabiszewski http://www.fabiszewski.net
This file is part of libmobi. Licensed under LGPL, either version 3, or any later. See http://www.gnu.org/licenses/
| MOBI_RET mobi_decompress_huffman | ( | unsigned char * | out, |
| const unsigned char * | in, | ||
| size_t * | len_out, | ||
| size_t | len_in, | ||
| const MOBIHuffCdic * | huffcdic | ||
| ) |
Decompressor for huff/cdic compressed text records.
Decompressor and HUFF/CDIC records parsing based on: perl EBook::Tools::Mobipocket python mobiunpack.py, calibre
| [out] | out | Decompressed destination data |
| [in] | in | Compressed source data |
| [in,out] | len_out | Size of the memory reserved for decompressed data. On return it is set to actual size of decompressed data |
| [in] | len_in | Size of compressed data |
| [in] | huffcdic | MOBIHuffCdic structure with parsed data from huff/cdic records |
| MOBI_RET mobi_decompress_lz77 | ( | unsigned char * | out, |
| const unsigned char * | in, | ||
| size_t * | len_out, | ||
| const size_t | len_in | ||
| ) |
Decompressor fo PalmDOC version of LZ77 compression.
Decompressor based on this algorithm: http://en.wikibooks.org/wiki/Data_Compression/Dictionary_compression#PalmDoc
| [out] | out | Decompressed destination data |
| [in] | in | Compressed source data |
| [in,out] | len_out | Size of the memory reserved for decompressed data. On return it is set to actual size of decompressed data |
| [in] | len_in | Size of compressed data |