2014-07-11 13:59:13 +02:00
|
|
|
|
#pragma once
|
2014-10-01 15:57:44 +02:00
|
|
|
|
|
|
|
|
|
|
// Copyright (C) 2014 Hykem <hykem@hotmail.com>
|
2021-05-02 10:26:32 +02:00
|
|
|
|
// Licensed under the terms of the GNU GPL, version 2.0 or later versions.
|
|
|
|
|
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
2014-10-01 15:57:44 +02:00
|
|
|
|
|
|
|
|
|
|
// Reverse-engineered custom Lempel–Ziv–Markov based compression.
|
|
|
|
|
|
|
2025-04-05 21:50:45 +02:00
|
|
|
|
void decode_range(unsigned int* range, unsigned int* code, unsigned char** src);
|
|
|
|
|
|
int decode_bit(unsigned int* range, unsigned int* code, int* index, unsigned char** src, unsigned char* c);
|
|
|
|
|
|
int decode_number(unsigned char* ptr, int index, int* bit_flag, unsigned int* range, unsigned int* code, unsigned char** src);
|
|
|
|
|
|
int decode_word(unsigned char* ptr, int index, int* bit_flag, unsigned int* range, unsigned int* code, unsigned char** src);
|
|
|
|
|
|
int decompress(unsigned char* out, unsigned char* in, unsigned int size);
|