#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
Go to the source code of this file.
|
#define | _CRT_SECURE_NO_WARNINGS |
|
#define | stb__hc(q, h, c) (((h) << 7) + ((h) >> 25) + q[c]) |
|
#define | stb__hc2(q, h, c, d) (((h) << 14) + ((h) >> 18) + (q[c] << 7) + q[d]) |
|
#define | stb__hc3(q, c, d, e) ((q[c] << 14) + (q[d] << 7) + q[e]) |
|
#define | stb__nc(b, d) ((d) <= window && ((b) > 9 || stb_not_crap(b,d))) |
|
#define | STB__SCRAMBLE(h) (((h) + ((h) >> 16)) & mask) |
|
#define | STB__TRY(t, p) |
|
#define | stb_out(v) do { if (stb__out) *stb__out++ = (stb_uchar) (v); else stb__write((stb_uchar) (v)); } while (0) |
|
|
static bool | binary_to_compressed_c (const char *filename, const char *symbol, bool use_base85_encoding, bool use_compression) |
|
char | Encode85Byte (unsigned int x) |
|
int | main (int argc, char **argv) |
|
static void | outliterals (stb_uchar *in, int numlit) |
|
static void | stb__write (unsigned char v) |
|
static stb_uint | stb_adler32 (stb_uint adler32, stb_uchar *buffer, stb_uint buflen) |
|
stb_uint | stb_compress (stb_uchar *out, stb_uchar *in, stb_uint len) |
|
static int | stb_compress_chunk (stb_uchar *history, stb_uchar *start, stb_uchar *end, int length, int *pending_literals, stb_uchar **chash, stb_uint mask) |
|
static int | stb_compress_inner (stb_uchar *input, stb_uint length) |
|
static unsigned int | stb_matchlen (stb_uchar *m1, stb_uchar *m2, stb_uint maxlen) |
|
static int | stb_not_crap (int best, int dist) |
|
static void | stb_out2 (stb_uint v) |
|
static void | stb_out3 (stb_uint v) |
|
static void | stb_out4 (stb_uint v) |
|
◆ _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS |
◆ stb__hc
#define stb__hc |
( |
|
q, |
|
|
|
h, |
|
|
|
c |
|
) |
| (((h) << 7) + ((h) >> 25) + q[c]) |
◆ stb__hc2
#define stb__hc2 |
( |
|
q, |
|
|
|
h, |
|
|
|
c, |
|
|
|
d |
|
) |
| (((h) << 14) + ((h) >> 18) + (q[c] << 7) + q[d]) |
◆ stb__hc3
#define stb__hc3 |
( |
|
q, |
|
|
|
c, |
|
|
|
d, |
|
|
|
e |
|
) |
| ((q[c] << 14) + (q[d] << 7) + q[e]) |
◆ stb__nc
◆ STB__SCRAMBLE
#define STB__SCRAMBLE |
( |
|
h | ) |
(((h) + ((h) >> 16)) & mask) |
◆ STB__TRY
#define STB__TRY |
( |
|
t, |
|
|
|
p |
|
) |
| |
Value: \
if (
p ? dist != q-t : 1) \
◆ stb_out
◆ stb_uchar
◆ stb_uint
◆ binary_to_compressed_c()
bool binary_to_compressed_c |
( |
const char * |
filename, |
|
|
const char * |
symbol, |
|
|
bool |
use_base85_encoding, |
|
|
bool |
use_compression |
|
) |
| |
|
static |
◆ Encode85Byte()
char Encode85Byte |
( |
unsigned int |
x | ) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ outliterals()
◆ stb__write()
static void stb__write |
( |
unsigned char |
v | ) |
|
|
static |
◆ stb_adler32()
◆ stb_compress()
◆ stb_compress_chunk()
◆ stb_compress_inner()
◆ stb_matchlen()
◆ stb_not_crap()
static int stb_not_crap |
( |
int |
best, |
|
|
int |
dist |
|
) |
| |
|
static |
◆ stb_out2()
◆ stb_out3()
◆ stb_out4()
◆ stb__hashsize
◆ stb__out
◆ stb__outbytes
◆ stb__outfile
◆ stb__running_adler
unsigned int stb__running_adler |
|
static |
◆ stb__window
int stb__window = 0x40000 |
|
static |