input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
unsigned int addChunk_PLTE(ucvector *out, const LodePNGColorMode *info) {
unsigned int error;
size_t i;
ucvector PLTE;
unsigned long v6;
v6 = __readfsqword(0x28u);
ucvector_init(&PLTE);
for (i = 0; i != 4 * info->palettesize; ++i) {
if ((i & 3) != 3)
ucvector_push_back(&PLTE, info->palette[i]);... | static unsigned addChunk_PLTE(ucvector *out, const LodePNGColorMode *info) {
unsigned error = 0;
size_t i;
ucvector PLTE;
ucvector_init(&PLTE);
for (i = 0; i != info->palettesize * 4; ++i) {
if (i % 4 != 3)
ucvector_push_back(&PLTE, info->palette[i]);
}
error = addChunk(out, "PLTE", PLTE.data, ... | addChunk_PLTE | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_bKGD(ucvector *out, const LodePNGInfo *info) {
size_t size;
unsigned char data[6];
unsigned long v5;
v5 = __readfsqword(0x28u);
size = 0;
if (info->color.colortype &&
info->color.colortype != LodePNGColorType_LCT_GREY_ALPHA) {
if (info->color.colortype == LodePNGColorType_LC... | static unsigned addChunk_bKGD(ucvector *out, const LodePNGInfo *info) {
unsigned char data[6];
size_t size = 0;
if (info->color.colortype == LCT_GREY ||
info->color.colortype == LCT_GREY_ALPHA) {
data[0] = (unsigned char)(info->background_r >> 8);
data[1] = (unsigned char)(info->background_r & 255);... | addChunk_bKGD | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_cHRM(ucvector *out, const LodePNGInfo *info) {
unsigned char data[40];
unsigned long v4;
v4 = __readfsqword(0x28u);
lodepng_set32bitInt(data, info->chrm_white_x);
lodepng_set32bitInt(&data[4], info->chrm_white_y);
lodepng_set32bitInt(&data[8], info->chrm_red_x);
lodepng_set32bitInt(... | static unsigned addChunk_cHRM(ucvector *out, const LodePNGInfo *info) {
unsigned char data[32];
lodepng_set32bitInt(data + 0, info->chrm_white_x);
lodepng_set32bitInt(data + 4, info->chrm_white_y);
lodepng_set32bitInt(data + 8, info->chrm_red_x);
lodepng_set32bitInt(data + 12, info->chrm_red_y);
lodepng_set... | addChunk_cHRM | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_gAMA(ucvector *out, const LodePNGInfo *info) {
unsigned char data[4];
unsigned long v4;
v4 = __readfsqword(0x28u);
lodepng_set32bitInt(data, info->gama_gamma);
return addChunk(out, "gAMA", data, 4u);
} | static unsigned addChunk_gAMA(ucvector *out, const LodePNGInfo *info) {
unsigned char data[4];
lodepng_set32bitInt(data, info->gama_gamma);
return addChunk(out, "gAMA", data, sizeof(data));
} | addChunk_gAMA | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_iCCP(ucvector *out, const LodePNGInfo *info,
LodePNGCompressSettings *zlibsettings) {
unsigned int error;
size_t i;
size_t ia;
ucvector data;
ucvector compressed;
unsigned long v10;
v10 = __readfsqword(0x28u);
ucvector_init(&data);
ucvector_init(&compr... | static unsigned addChunk_iCCP(ucvector *out, const LodePNGInfo *info,
LodePNGCompressSettings *zlibsettings) {
unsigned error = 0;
ucvector data, compressed;
size_t i;
ucvector_init(&data);
ucvector_init(&compressed);
for (i = 0; info->iccp_name[i] != 0; ++i)
ucvector_push... | addChunk_iCCP | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_iTXt(ucvector *out, unsigned int compressed,
const char *keyword, const char *langtag,
const char *transkey, const char *textstring,
LodePNGCompressSettings *zlibsettings) {
unsigned int error;
size_t i;
size_t ... | static unsigned addChunk_iTXt(ucvector *out, unsigned compressed,
const char *keyword, const char *langtag,
const char *transkey, const char *textstring,
LodePNGCompressSettings *zlibsettings) {
unsigned error = 0;
ucvector da... | addChunk_iTXt | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_pHYs(ucvector *out, const LodePNGInfo *info) {
unsigned char data[9];
unsigned long v4;
v4 = __readfsqword(0x28u);
lodepng_set32bitInt(data, info->phys_x);
lodepng_set32bitInt(&data[4], info->phys_y);
data[8] = info->phys_unit;
return addChunk(out, "pHYs", data, 9u);
} | static unsigned addChunk_pHYs(ucvector *out, const LodePNGInfo *info) {
unsigned char data[9];
lodepng_set32bitInt(data + 0, info->phys_x);
lodepng_set32bitInt(data + 4, info->phys_y);
data[8] = info->phys_unit;
return addChunk(out, "pHYs", data, sizeof(data));
} | addChunk_pHYs | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_sRGB(ucvector *out, const LodePNGInfo *info) {
unsigned char data;
unsigned long v4;
v4 = __readfsqword(0x28u);
data = info->srgb_intent;
return addChunk(out, "sRGB", &data, 1u);
} | static unsigned addChunk_sRGB(ucvector *out, const LodePNGInfo *info) {
unsigned char data = info->srgb_intent;
return addChunk(out, "sRGB", &data, 1);
} | addChunk_sRGB | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_tEXt(ucvector *out, const char *keyword,
const char *textstring) {
unsigned int error;
size_t i;
size_t ia;
ucvector text;
unsigned long v9;
v9 = __readfsqword(0x28u);
ucvector_init(&text);
for (i = 0; keyword[i]; ++i)
ucvector_push_back(&text, keywo... | static unsigned addChunk_tEXt(ucvector *out, const char *keyword,
const char *textstring) {
unsigned error = 0;
size_t i;
ucvector text;
ucvector_init(&text);
for (i = 0; keyword[i] != 0; ++i)
ucvector_push_back(&text, (unsigned char)keyword[i]);
if (i < 1 || i > 79)
re... | addChunk_tEXt | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_tIME(ucvector *out, const LodePNGTime *time) {
unsigned char data[7];
unsigned long v4;
v4 = __readfsqword(0x28u);
data[0] = BYTE1(time->year);
data[1] = time->year;
data[2] = time->month;
data[3] = time->day;
data[4] = time->hour;
data[5] = time->minute;
data[6] = time->secon... | static unsigned addChunk_tIME(ucvector *out, const LodePNGTime *time) {
unsigned char data[7];
data[0] = (unsigned char)(time->year >> 8);
data[1] = (unsigned char)(time->year & 255);
data[2] = (unsigned char)time->month;
data[3] = (unsigned char)time->day;
data[4] = (unsigned char)time->hour;
data[5] = (... | addChunk_tIME | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_tRNS(ucvector *out, const LodePNGColorMode *info) {
unsigned int error;
size_t i;
size_t ia;
size_t amount;
ucvector tRNS;
unsigned long v8;
v8 = __readfsqword(0x28u);
ucvector_init(&tRNS);
if (info->colortype == LodePNGColorType_LCT_PALETTE) {
amount = info->palettesize;
... | static unsigned addChunk_tRNS(ucvector *out, const LodePNGColorMode *info) {
unsigned error = 0;
size_t i;
ucvector tRNS;
ucvector_init(&tRNS);
if (info->colortype == LCT_PALETTE) {
size_t amount = info->palettesize;
for (i = info->palettesize; i != 0; --i) {
if (info->palette[4 * (i - 1) + 3] ... | addChunk_tRNS | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_zTXt(ucvector *out, const char *keyword,
const char *textstring,
LodePNGCompressSettings *zlibsettings) {
unsigned int error;
size_t i;
size_t ia;
size_t textsize;
ucvector data;
ucvector compressed;
unsigned long v13;
v13 = __... | static unsigned addChunk_zTXt(ucvector *out, const char *keyword,
const char *textstring,
LodePNGCompressSettings *zlibsettings) {
unsigned error = 0;
ucvector data, compressed;
size_t i, textsize = lodepng_strlen(textstring);
ucvector_init(&data);
... | addChunk_zTXt | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void addColorBits(unsigned char *out, size_t index, unsigned int bits,
unsigned int in) {
int v4;
unsigned int ina;
if (bits == 1) {
v4 = 7;
} else if (bits == 2) {
v4 = 3;
} else {
v4 = 1;
}
ina = (~(-1 << bits) & in) << (bits * (v4 - (v4 & index)));
if ((v4 & (unsigned i... | static void addColorBits(unsigned char *out, size_t index, unsigned bits,
unsigned in) {
unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1;
unsigned p = index & m;
in &= (1u << bits) - 1u;
in = in << (bits * (m - p));
if (p == 0)
out[index * bits / 8u] = in;
else
out[index * b... | addColorBits | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void addLengthDistance(uivector *values, size_t length, size_t distance) {
unsigned int length_code;
unsigned int extra_length;
unsigned int dist_code;
unsigned int extra_distance;
length_code = searchCodeIndex(LENGTHBASE, 0x1Du, length);
extra_length = length - LENGTHBASE[length_code];
dist_code = searc... | static void addLengthDistance(uivector *values, size_t length,
size_t distance) {
unsigned length_code = (unsigned)searchCodeIndex(LENGTHBASE, 29, length);
unsigned extra_length = (unsigned)(length - LENGTHBASE[length_code]);
unsigned dist_code = (unsigned)searchCodeIndex(DISTANCEBA... | addLengthDistance | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void addPaddingBits(unsigned char *out, const unsigned char *in,
size_t olinebits, size_t ilinebits, unsigned int h) {
unsigned char bit;
unsigned int y;
size_t obp;
size_t ibp;
size_t x;
size_t diff;
unsigned long v13;
v13 = __readfsqword(0x28u);
diff = olinebits - ilinebits;
o... | static void addPaddingBits(unsigned char *out, const unsigned char *in,
size_t olinebits, size_t ilinebits, unsigned h) {
unsigned y;
size_t diff = olinebits - ilinebits;
size_t obp = 0, ibp = 0;
for (y = 0; y != h; ++y) {
size_t x;
for (x = 0; x < ilinebits; ++x) {
uns... | addPaddingBits | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addUnknownChunks(ucvector *out, unsigned char *data,
size_t datasize) {
unsigned int error;
unsigned char *inchunk;
for (inchunk = data; datasize > inchunk - data;
inchunk = lodepng_chunk_next(inchunk)) {
error = lodepng_chunk_append(&out->data, &out->size, i... | static unsigned addUnknownChunks(ucvector *out, unsigned char *data,
size_t datasize) {
unsigned char *inchunk = data;
while ((size_t)(inchunk - data) < datasize) {
CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk));
out->allocsize = out->size;
inch... | addUnknownChunks | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int adler32(const unsigned char *data, unsigned int len) {
return update_adler32(1u, data, len);
} | static unsigned adler32(const unsigned char *data, unsigned len) {
return update_adler32(1u, data, len);
} | adler32 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void advanceBits(LodePNGBitReader *reader, size_t nbits) {
reader->buffer >>= nbits;
reader->bp += nbits;
} | static void advanceBits(LodePNGBitReader *reader, size_t nbits) {
reader->buffer >>= nbits;
reader->bp += nbits;
} | advanceBits | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
char *alloc_string(const char *in) {
size_t i;
size_t insize;
char *out;
insize = lodepng_strlen(in);
out = (char *)lodepng_malloc(insize + 1);
if (out) {
for (i = 0; i != insize; ++i)
out[i] = in[i];
out[i] = 0;
}
return out;
} | static char *alloc_string(const char *in) {
size_t insize = lodepng_strlen(in);
char *out = (char *)lodepng_malloc(insize + 1);
if (out) {
size_t i;
for (i = 0; i != insize; ++i) {
out[i] = in[i];
}
out[i] = 0;
}
return out;
} | alloc_string | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int auto_choose_color(LodePNGColorMode *mode_out,
const LodePNGColorMode *mode_in,
const LodePNGColorStats *stats) {
int v3;
bool v4;
LodePNGColorType v5;
unsigned int error;
unsigned int palette_ok;
unsigned int gray_ok;
int alpha;
... | unsigned auto_choose_color(LodePNGColorMode *mode_out,
const LodePNGColorMode *mode_in,
const LodePNGColorStats *stats) {
unsigned error = 0;
unsigned palettebits;
size_t i, n;
size_t numpixels = stats->numpixels;
unsigned palette_ok, gray_ok;
unsigned ... | auto_choose_color | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void boundaryPM(BPMLists *lists, BPMNode *leaves, size_t numpresent, int c,
int num) {
BPMNode **chains1;
BPMNode **v6;
BPMNode **v7;
unsigned int lastindex;
int sum;
lastindex = lists->chains1[c]->index;
if (c) {
sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight;
... | static void boundaryPM(BPMLists *lists, BPMNode *leaves, size_t numpresent,
int c, int num) {
unsigned lastindex = lists->chains1[c]->index;
if (c == 0) {
if (lastindex >= numpresent)
return;
lists->chains0[c] = lists->chains1[c];
lists->chains1[c] =
bpmnode_create(... | boundaryPM | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
BPMNode *bpmnode_create(BPMLists *lists, int weight, unsigned int index,
BPMNode *tail) {
BPMNode *memory;
BPMNode **freelist;
unsigned int numfree;
BPMNode **v7;
unsigned int nextfree;
unsigned int i;
long ia;
unsigned int ib;
BPMNode *node;
BPMNode *nodea;
BPMNode *result... | static BPMNode *bpmnode_create(BPMLists *lists, int weight, unsigned index,
BPMNode *tail) {
unsigned i;
BPMNode *result;
if (lists->nextfree >= lists->numfree) {
for (i = 0; i != lists->memsize; ++i)
lists->memory[i].in_use = 0;
for (i = 0; i != lists->listsize; ++i... | bpmnode_create | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void bpmnode_sort(BPMNode *leaves, size_t num) {
BPMNode *v2;
BPMNode *v3;
size_t v4;
size_t v5;
size_t v6;
BPMNode *v7;
BPMNode *v8;
BPMNode *v9;
size_t v10;
BPMNode *v11;
BPMNode *v12;
BPMNode *tail;
size_t width;
char counter;
size_t p;
size_t i;
size_t j;
size_t k;
BPMNode *mem... | static void bpmnode_sort(BPMNode *leaves, size_t num) {
BPMNode *mem = (BPMNode *)lodepng_malloc(sizeof(*leaves) * num);
size_t width, counter = 0;
for (width = 1; width < num; width *= 2) {
BPMNode *a = (counter & 1) ? mem : leaves;
BPMNode *b = (counter & 1) ? leaves : mem;
size_t p;
for (p = 0;... | bpmnode_sort | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int checkColorValidity(LodePNGColorType colortype, unsigned int bd) {
unsigned int result;
switch (colortype) {
case LodePNGColorType_LCT_GREY:
if (bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)
goto LABEL_23;
result = 37;
break;
case LodePNGColorType_LCT_RGB:
if (bd == 8 ... | static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) {
switch (colortype) {
case LCT_GREY:
if (!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16))
return 37;
break;
case LCT_RGB:
if (!(bd == 8 || bd == 16))
return 37;
break;
case LCT_PALETTE:
if (!(bd ... | checkColorValidity | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void color_tree_add(ColorTree *tree, unsigned char r, unsigned char g,
unsigned char b, unsigned char a, unsigned int index) {
int bit;
int i;
for (bit = 0; bit <= 7; ++bit) {
i = 2 * (2 * (2 * (((int)r >> bit) & 1) + (((int)g >> bit) & 1)) +
(((int)b >> bit) & 1)) +
... | static void color_tree_add(ColorTree *tree, unsigned char r, unsigned char g,
unsigned char b, unsigned char a, unsigned index) {
int bit;
for (bit = 0; bit < 8; ++bit) {
int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) +
1 * ((a >> bit) & 1);
... | color_tree_add | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void color_tree_cleanup(ColorTree *tree) {
int i;
for (i = 0; i != 16; ++i) {
if (tree->children[i]) {
color_tree_cleanup(tree->children[i]);
lodepng_free(tree->children[i]);
}
}
} | static void color_tree_cleanup(ColorTree *tree) {
int i;
for (i = 0; i != 16; ++i) {
if (tree->children[i]) {
color_tree_cleanup(tree->children[i]);
lodepng_free(tree->children[i]);
}
}
} | color_tree_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
int color_tree_get(ColorTree *tree, unsigned char r, unsigned char g,
unsigned char b, unsigned char a) {
int bit;
int i;
for (bit = 0; bit <= 7; ++bit) {
i = 2 * (2 * (2 * (((int)r >> bit) & 1) + (((int)g >> bit) & 1)) +
(((int)b >> bit) & 1)) +
(((int)a >> bit) & 1);... | static int color_tree_get(ColorTree *tree, unsigned char r, unsigned char g,
unsigned char b, unsigned char a) {
int bit = 0;
for (bit = 0; bit < 8; ++bit) {
int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) +
1 * ((a >> bit) & 1);
if (!tree->ch... | color_tree_get | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
int color_tree_has(ColorTree *tree, unsigned char r, unsigned char g,
unsigned char b, unsigned char a) {
return color_tree_get(tree, r, g, b, a) >= 0;
} | static int color_tree_has(ColorTree *tree, unsigned char r, unsigned char g,
unsigned char b, unsigned char a) {
return color_tree_get(tree, r, g, b, a) >= 0;
} | color_tree_has | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void color_tree_init(ColorTree *tree) {
int i;
for (i = 0; i != 16; ++i)
tree->children[i] = 0;
tree->index = -1;
} | static void color_tree_init(ColorTree *tree) {
int i;
for (i = 0; i != 16; ++i)
tree->children[i] = 0;
tree->index = -1;
} | color_tree_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int countZeros(const unsigned char *data, size_t size, size_t pos) {
const unsigned char *dataa;
const unsigned char *end;
end = &data[pos + 258];
if (end > &data[size])
end = &data[size];
for (dataa = &data[pos]; dataa != end && !*dataa; ++dataa)
;
return (_DWORD)dataa - ((_DWORD)data + p... | static unsigned countZeros(const unsigned char *data, size_t size, size_t pos) {
const unsigned char *start = data + pos;
const unsigned char *end = start + MAX_SUPPORTED_DEFLATE_LENGTH;
if (end > data + size)
end = data + size;
data = start;
while (data != end && *data == 0)
++data;
return (unsign... | countZeros | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void decodeGeneric(unsigned char **out, unsigned int *w, unsigned int *h,
LodePNGState *state, const unsigned char *in,
size_t insize) {
size_t raw_size_idat;
size_t v8;
size_t v9;
size_t v10;
size_t v11;
size_t v12;
size_t v13;
unsigned char IEND;
unsigned int un... | static void decodeGeneric(unsigned char **out, unsigned *w, unsigned *h,
LodePNGState *state, const unsigned char *in,
size_t insize) {
unsigned char IEND = 0;
const unsigned char *chunk;
size_t i;
ucvector idat;
unsigned char *scanlines = 0;
size_t scanli... | decodeGeneric | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int deflate(unsigned char **out, size_t *outsize,
const unsigned char *in, size_t insize,
const LodePNGCompressSettings *settings) {
if (settings->custom_deflate)
return settings->custom_deflate(out, outsize, in, insize, settings);
else
return lodepng_defla... | static unsigned deflate(unsigned char **out, size_t *outsize,
const unsigned char *in, size_t insize,
const LodePNGCompressSettings *settings) {
if (settings->custom_deflate) {
return settings->custom_deflate(out, outsize, in, insize, settings);
} else {
retur... | deflate | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int deflateDynamic(LodePNGBitWriter *writer, Hash *hash,
const unsigned char *data, size_t datapos,
size_t dataend,
const LodePNGCompressSettings *settings,
unsigned int final) {
unsigned int Lengt... | static unsigned deflateDynamic(LodePNGBitWriter *writer, Hash *hash,
const unsigned char *data, size_t datapos,
size_t dataend,
const LodePNGCompressSettings *settings,
unsigned final) {
unsigne... | deflateDynamic | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int deflateFixed(LodePNGBitWriter *writer, Hash *hash,
const unsigned char *data, size_t datapos,
size_t dataend,
const LodePNGCompressSettings *settings,
unsigned int final) {
size_t Length;
unsigned in... | static unsigned deflateFixed(LodePNGBitWriter *writer, Hash *hash,
const unsigned char *data, size_t datapos,
size_t dataend,
const LodePNGCompressSettings *settings,
unsigned final) {
HuffmanTree tree_... | deflateFixed | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int deflateNoCompression(ucvector *out, const unsigned char *data,
size_t datasize) {
unsigned int v3;
unsigned int datapos;
short LEN;
size_t i;
size_t j;
size_t numdeflateblocks;
numdeflateblocks = (datasize + 65534) / 0xFFFF;
datapos = 0;
for (i = 0; i !=... | static unsigned deflateNoCompression(ucvector *out, const unsigned char *data,
size_t datasize) {
size_t i, j, numdeflateblocks = (datasize + 65534u) / 65535u;
unsigned datapos = 0;
for (i = 0; i != numdeflateblocks; ++i) {
unsigned BFINAL, BTYPE, LEN, NLEN;
unsigned ... | deflateNoCompression | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int encodeLZ77(uivector *out, Hash *hash, const unsigned char *in,
size_t inpos, size_t insize, unsigned int windowsize,
unsigned int minmatch, unsigned int nicematch,
unsigned int lazymatching) {
unsigned int v9;
int v10;
size_t v12... | static unsigned encodeLZ77(uivector *out, Hash *hash, const unsigned char *in,
size_t inpos, size_t insize, unsigned windowsize,
unsigned minmatch, unsigned nicematch,
unsigned lazymatching) {
size_t pos;
unsigned i, error = 0;
unsi... | encodeLZ77 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int ensureBits17(LodePNGBitReader *reader, size_t nbits) {
size_t start;
unsigned long size;
start = reader->bp >> 3;
size = reader->size;
if (size <= start + 2) {
reader->buffer = 0;
if (start < size)
reader->buffer |= reader->data[start];
if (size > start + 1)
reader->buffe... | static unsigned ensureBits17(LodePNGBitReader *reader, size_t nbits) {
size_t start = reader->bp >> 3u;
size_t size = reader->size;
if (start + 2u < size) {
reader->buffer = (unsigned)(reader->data[start + 0]) |
(unsigned)(reader->data[start + 1] << 8u) |
(unsigned)(r... | ensureBits17 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int ensureBits25(LodePNGBitReader *reader, size_t nbits) {
size_t start;
unsigned long size;
start = reader->bp >> 3;
size = reader->size;
if (size <= start + 3) {
reader->buffer = 0;
if (start < size)
reader->buffer |= reader->data[start];
if (size > start + 1)
reader->buffe... | static LODEPNG_INLINE unsigned ensureBits25(LodePNGBitReader *reader,
size_t nbits) {
size_t start = reader->bp >> 3u;
size_t size = reader->size;
if (start + 3u < size) {
reader->buffer = (unsigned)(reader->data[start + 0]) |
(unsigned)(reader-... | ensureBits25 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int ensureBits32(LodePNGBitReader *reader, size_t nbits) {
size_t start;
unsigned long size;
start = reader->bp >> 3;
size = reader->size;
if (size <= start + 4) {
reader->buffer = 0;
if (start < size)
reader->buffer |= reader->data[start];
if (size > start + 1)
reader->buffe... | static LODEPNG_INLINE unsigned ensureBits32(LodePNGBitReader *reader,
size_t nbits) {
size_t start = reader->bp >> 3u;
size_t size = reader->size;
if (start + 4u < size) {
reader->buffer = (unsigned)(reader->data[start + 0]) |
(unsigned)(reader-... | ensureBits32 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int ensureBits9(LodePNGBitReader *reader, size_t nbits) {
size_t start;
unsigned long size;
start = reader->bp >> 3;
size = reader->size;
if (size <= start + 1) {
reader->buffer = 0;
if (start < size)
reader->buffer |= reader->data[start];
reader->buffer >>= reader->bp & 7;
ret... | static unsigned ensureBits9(LodePNGBitReader *reader, size_t nbits) {
size_t start = reader->bp >> 3u;
size_t size = reader->size;
if (start + 1u < size) {
reader->buffer = (unsigned)(reader->data[start + 0]) |
(unsigned)(reader->data[start + 1] << 8u);
reader->buffer >>= (reader->bp ... | ensureBits9 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int filter(unsigned char *out, const unsigned char *in, unsigned int w,
unsigned int h, const LodePNGColorMode *info,
const LodePNGEncoderSettings *settings) {
long v7;
long v8;
unsigned int (*custom_zlib)(unsigned char **, size_t *, const unsigned char *,
... | static unsigned filter(unsigned char *out, const unsigned char *in, unsigned w,
unsigned h, const LodePNGColorMode *info,
const LodePNGEncoderSettings *settings) {
unsigned bpp = lodepng_get_bpp(info);
size_t linebytes = (w * bpp + 7u) / 8u;
size_t bytewidth = (bpp... | filter | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void filterScanline(unsigned char *out, const unsigned char *scanline,
const unsigned char *prevline, size_t length,
size_t bytewidth, unsigned char filterType) {
unsigned char v6;
size_t i;
size_t ia;
size_t ib;
size_t ic;
size_t id;
size_t ie;
size_t ig;
size_... | static void filterScanline(unsigned char *out, const unsigned char *scanline,
const unsigned char *prevline, size_t length,
size_t bytewidth, unsigned char filterType) {
size_t i;
switch (filterType) {
case 0:
for (i = 0; i != length; ++i)
out[i] = s... | filterScanline | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int generateFixedDistanceTree(HuffmanTree *tree) {
unsigned int i;
unsigned int error;
unsigned int *bitlen;
bitlen = (unsigned int *)lodepng_malloc(0x80u);
if (!bitlen)
return 83;
for (i = 0; i != 32; ++i)
bitlen[i] = 5;
error = HuffmanTree_makeFromLengths(tree, bitlen, 0x20u, 0xFu);
... | static unsigned generateFixedDistanceTree(HuffmanTree *tree) {
unsigned i, error = 0;
unsigned *bitlen =
(unsigned *)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned));
if (!bitlen)
return 83;
for (i = 0; i != NUM_DISTANCE_SYMBOLS; ++i)
bitlen[i] = 5;
error = HuffmanTree_makeFromLengths(tr... | generateFixedDistanceTree | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int generateFixedLitLenTree(HuffmanTree *tree) {
unsigned int i;
unsigned int ia;
unsigned int ib;
unsigned int ic;
unsigned int error;
unsigned int *bitlen;
bitlen = (unsigned int *)lodepng_malloc(0x480u);
if (!bitlen)
return 83;
for (i = 0; i <= 0x8F; ++i)
bitlen[i] = 8;
for (ia ... | static unsigned generateFixedLitLenTree(HuffmanTree *tree) {
unsigned i, error = 0;
unsigned *bitlen =
(unsigned *)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned));
if (!bitlen)
return 83;
for (i = 0; i <= 143; ++i)
bitlen[i] = 8;
for (i = 144; i <= 255; ++i)
bitlen[i] = 9;
for... | generateFixedLitLenTree | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int getHash(const unsigned char *data, size_t size, size_t pos) {
unsigned int result;
size_t i;
result = 0;
if (size <= pos + 2) {
if (pos >= size)
return 0;
for (i = 0; i != size - pos; ++i)
result ^= data[i + pos] << (8 * i);
} else {
LOWORD(result) = (data[pos + 2] << 8) ... | static unsigned getHash(const unsigned char *data, size_t size, size_t pos) {
unsigned result = 0;
if (pos + 2 < size) {
result ^= (unsigned)(data[pos + 0] << 0u);
result ^= (unsigned)(data[pos + 1] << 4u);
result ^= (unsigned)(data[pos + 2] << 8u);
} else {
size_t amount, i;
if (pos >= size)... | getHash | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int getNumColorChannels(LodePNGColorType colortype) {
unsigned int result;
switch (colortype) {
case LodePNGColorType_LCT_GREY:
result = 1;
break;
case LodePNGColorType_LCT_RGB:
result = 3;
break;
case LodePNGColorType_LCT_PALETTE:
result = 1;
break;
case LodePNGColorType_L... | static unsigned getNumColorChannels(LodePNGColorType colortype) {
switch (colortype) {
case LCT_GREY:
return 1;
case LCT_RGB:
return 3;
case LCT_PALETTE:
return 1;
case LCT_GREY_ALPHA:
return 2;
case LCT_RGBA:
return 4;
default:
return 0;
}
} | getNumColorChannels | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int getPaletteTranslucency(const unsigned char *palette,
size_t palettesize) {
int key;
unsigned int r;
unsigned int g;
unsigned int b;
size_t i;
key = 0;
r = 0;
g = 0;
b = 0;
for (i = 0; i != palettesize; ++i) {
if (key || palette[4 * i + 3]) {
... | static unsigned getPaletteTranslucency(const unsigned char *palette,
size_t palettesize) {
size_t i;
unsigned key = 0;
unsigned r = 0, g = 0, b = 0;
for (i = 0; i != palettesize; ++i) {
if (!key && palette[4 * i + 3] == 0) {
r = palette[4 * i + 0];
g = pale... | getPaletteTranslucency | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void getPixelColorRGBA16(unsigned short *r, unsigned short *g,
unsigned short *b, unsigned short *a,
const unsigned char *in, size_t i,
const LodePNGColorMode *mode) {
if (mode->colortype) {
switch (mode->colortype) {
case LodePNGColor... | static void getPixelColorRGBA16(unsigned short *r, unsigned short *g,
unsigned short *b, unsigned short *a,
const unsigned char *in, size_t i,
const LodePNGColorMode *mode) {
if (mode->colortype == LCT_GREY) {
*r = *g ... | getPixelColorRGBA16 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void getPixelColorRGBA8(unsigned char *r, unsigned char *g, unsigned char *b,
unsigned char *a, const unsigned char *in, size_t i,
const LodePNGColorMode *mode) {
size_t v7;
size_t v8;
unsigned int index;
unsigned int highest;
unsigned int value;
size_t j[2];
... | static void getPixelColorRGBA8(unsigned char *r, unsigned char *g,
unsigned char *b, unsigned char *a,
const unsigned char *in, size_t i,
const LodePNGColorMode *mode) {
if (mode->colortype == LCT_GREY) {
if (mode->bitdep... | getPixelColorRGBA8 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void getPixelColorsRGB8(unsigned char *buffer, size_t numpixels,
const unsigned char *in, const LodePNGColorMode *mode) {
unsigned char *v4;
unsigned char *buffera;
unsigned int highest;
size_t j;
size_t i;
unsigned long v11;
buffera = buffer;
v11 = __readfsqword(0x28u);
if (m... | static void getPixelColorsRGB8(unsigned char *LODEPNG_RESTRICT buffer,
size_t numpixels,
const unsigned char *LODEPNG_RESTRICT in,
const LodePNGColorMode *mode) {
const unsigned num_channels = 3;
size_t i;
if (mode->color... | getPixelColorsRGB8 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void getPixelColorsRGBA8(unsigned char *buffer, size_t numpixels,
const unsigned char *in,
const LodePNGColorMode *mode) {
char v4;
char v5;
char v6;
unsigned char *v7;
unsigned char *buffera;
unsigned char *bufferb;
unsigned char *bufferc;
unsigned int ... | static void getPixelColorsRGBA8(unsigned char *LODEPNG_RESTRICT buffer,
size_t numpixels,
const unsigned char *LODEPNG_RESTRICT in,
const LodePNGColorMode *mode) {
unsigned num_channels = 4;
size_t i;
if (mode->colorty... | getPixelColorsRGBA8 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int getTreeInflateDynamic(HuffmanTree *tree_ll, HuffmanTree *tree_d,
LodePNGBitReader *reader) {
unsigned int *v4;
unsigned int *v5;
unsigned int *v6;
int error;
unsigned int n;
unsigned int na;
unsigned int nb;
unsigned int i;
unsigned int ia;
unsigned in... | static unsigned getTreeInflateDynamic(HuffmanTree *tree_ll, HuffmanTree *tree_d,
LodePNGBitReader *reader) {
unsigned error = 0;
unsigned n, HLIT, HDIST, HCLEN, i;
unsigned *bitlen_ll = 0;
unsigned *bitlen_d = 0;
unsigned *bitlen_cl = 0;
HuffmanTree tree_cl;
if (!... | getTreeInflateDynamic | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void getTreeInflateFixed(HuffmanTree *tree_ll, HuffmanTree *tree_d) {
generateFixedLitLenTree(tree_ll);
generateFixedDistanceTree(tree_d);
} | static void getTreeInflateFixed(HuffmanTree *tree_ll, HuffmanTree *tree_d) {
generateFixedLitLenTree(tree_ll);
generateFixedDistanceTree(tree_d);
} | getTreeInflateFixed | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int getValueRequiredBits(unsigned char value) {
if (!value || value == 0xFF)
return 1;
if (value != 17 * (value / 0x11u))
return 8;
if (value == 85 * (value / 0x55u))
return 2;
return 4;
} | static unsigned getValueRequiredBits(unsigned char value) {
if (value == 0 || value == 255)
return 1;
if (value % 17 == 0)
return value % 85 == 0 ? 2 : 4;
return 8;
} | getValueRequiredBits | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void hash_cleanup(Hash *hash) {
lodepng_free(hash->head);
lodepng_free(hash->val);
lodepng_free(hash->chain);
lodepng_free(hash->zeros);
lodepng_free(hash->headz);
lodepng_free(hash->chainz);
} | static void hash_cleanup(Hash *hash) {
lodepng_free(hash->head);
lodepng_free(hash->val);
lodepng_free(hash->chain);
lodepng_free(hash->zeros);
lodepng_free(hash->headz);
lodepng_free(hash->chainz);
} | hash_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int hash_init(Hash *hash, unsigned int windowsize) {
unsigned int i;
unsigned int ia;
unsigned int ib;
unsigned int ic;
unsigned int id;
hash->head = (int *)lodepng_malloc(0x40000u);
hash->val = (int *)lodepng_malloc(4LL * windowsize);
hash->chain = (unsigned short *)lodepng_malloc(2LL * windo... | static unsigned hash_init(Hash *hash, unsigned windowsize) {
unsigned i;
hash->head = (int *)lodepng_malloc(sizeof(int) * HASH_NUM_VALUES);
hash->val = (int *)lodepng_malloc(sizeof(int) * windowsize);
hash->chain =
(unsigned short *)lodepng_malloc(sizeof(unsigned short) * windowsize);
hash->zeros =
... | hash_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int huffmanDecodeSymbol(LodePNGBitReader *reader,
const HuffmanTree *codetree) {
unsigned short code;
unsigned short l;
unsigned short value;
unsigned int index2;
code = peekBits(reader, 9u);
l = codetree->table_len[code];
value = codetree->table_value[code];
i... | static unsigned huffmanDecodeSymbol(LodePNGBitReader *reader,
const HuffmanTree *codetree) {
unsigned short code = peekBits(reader, FIRSTBITS);
unsigned short l = codetree->table_len[code];
unsigned short value = codetree->table_value[code];
if (l <= FIRSTBITS) {
advanceB... | huffmanDecodeSymbol | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
size_t ilog2(size_t i) {
size_t result;
result = 0;
while (i > 0xFFFF) {
result += 16LL;
i >>= 16;
}
while (i > 0xFF) {
result += 8LL;
i >>= 8;
}
while (i > 0xF) {
result += 4LL;
i >>= 4;
}
while (i > 1) {
++result;
i >>= 1;
}
return result;
} | static size_t ilog2(size_t i) {
size_t result = 0;
while (i >= 65536) {
result += 16;
i >>= 16;
}
while (i >= 256) {
result += 8;
i >>= 8;
}
while (i >= 16) {
result += 4;
i >>= 4;
}
while (i >= 2) {
result += 1;
i >>= 1;
}
return result;
} | ilog2 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
size_t ilog2i(size_t i) {
size_t l;
if (!i)
return 0;
l = ilog2(i);
return l * i + 2 * (i - (unsigned int)(1 << l));
} | static size_t ilog2i(size_t i) {
size_t l;
if (i == 0)
return 0;
l = ilog2(i);
return i * l + ((i - (1u << l)) << 1u);
} | ilog2i | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int inflate(unsigned char **out, size_t *outsize,
const unsigned char *in, size_t insize,
const LodePNGDecompressSettings *settings) {
if (settings->custom_inflate)
return settings->custom_inflate(out, outsize, in, insize, settings);
else
return lodepng_inf... | static unsigned inflate(unsigned char **out, size_t *outsize,
const unsigned char *in, size_t insize,
const LodePNGDecompressSettings *settings) {
if (settings->custom_inflate) {
return settings->custom_inflate(out, outsize, in, insize, settings);
} else {
ret... | inflate | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int inflateHuffmanBlock(ucvector *out, size_t *pos,
LodePNGBitReader *reader, unsigned int btype) {
size_t v4;
unsigned char *v5;
unsigned char *data;
size_t v7;
int error;
unsigned int distance;
unsigned int code_ll;
unsigned int numextrabits_l;
unsigned int ... | static unsigned inflateHuffmanBlock(ucvector *out, size_t *pos,
LodePNGBitReader *reader, unsigned btype) {
unsigned error = 0;
HuffmanTree tree_ll;
HuffmanTree tree_d;
HuffmanTree_init(&tree_ll);
HuffmanTree_init(&tree_d);
if (btype == 1)
getTreeInflateFixed(&tree_... | inflateHuffmanBlock | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int inflateNoCompression(ucvector *out, size_t *pos,
LodePNGBitReader *reader,
const LodePNGDecompressSettings *settings) {
unsigned int LEN;
unsigned int NLEN;
unsigned long size;
size_t bytepos;
size_t byteposb;
size_t byteposa;
... | static unsigned
inflateNoCompression(ucvector *out, size_t *pos, LodePNGBitReader *reader,
const LodePNGDecompressSettings *settings) {
size_t bytepos;
size_t size = reader->size;
unsigned LEN, NLEN, error = 0;
bytepos = (reader->bp + 7u) >> 3u;
if (bytepos + 4 >= size)
return 52;
... | inflateNoCompression | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int isGrayICCProfile(const unsigned char *profile, unsigned int size) {
unsigned int result;
if (size <= 0x13)
return 0;
LOBYTE(result) = profile[16] == 71 && profile[17] == 82 &&
profile[18] == 65 && profile[19] == 89;
return (unsigned char)result;
} | static unsigned isGrayICCProfile(const unsigned char *profile, unsigned size) {
if (size < 20)
return 0;
return profile[16] == 'G' && profile[17] == 'R' && profile[18] == 'A' &&
profile[19] == 'Y';
} | isGrayICCProfile | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int isRGBICCProfile(const unsigned char *profile, unsigned int size) {
unsigned int result;
if (size <= 0x13)
return 0;
LOBYTE(result) = profile[16] == 82 && profile[17] == 71 &&
profile[18] == 66 && profile[19] == 32;
return (unsigned char)result;
} | static unsigned isRGBICCProfile(const unsigned char *profile, unsigned size) {
if (size < 20)
return 0;
return profile[16] == 'R' && profile[17] == 'G' && profile[18] == 'B' &&
profile[19] == ' ';
} | isRGBICCProfile | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_add_itext(LodePNGInfo *info, const char *key,
const char *langtag, const char *transkey,
const char *str) {
char **v6;
char **v7;
char **v8;
char **v9;
char **new_keys;
char **new_langtags;
char **new_transkeys;
char **ne... | unsigned lodepng_add_itext(LodePNGInfo *info, const char *key,
const char *langtag, const char *transkey,
const char *str) {
char **new_keys = (char **)(lodepng_realloc(
info->itext_keys, sizeof(char *) * (info->itext_num + 1)));
char **new_langtags = (cha... | lodepng_add_itext | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_add_text(LodePNGInfo *info, const char *key,
const char *str) {
char **v4;
char **v5;
char **new_keys;
char **new_strings;
new_keys =
(char **)lodepng_realloc(info->text_keys, 8 * (info->text_num + 1));
new_strings =
(char **)lodepng_realloc(in... | unsigned lodepng_add_text(LodePNGInfo *info, const char *key, const char *str) {
char **new_keys = (char **)(lodepng_realloc(
info->text_keys, sizeof(char *) * (info->text_num + 1)));
char **new_strings = (char **)(lodepng_realloc(
info->text_strings, sizeof(char *) * (info->text_num + 1)));
if (!new_... | lodepng_add_text | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
int lodepng_addofl(size_t a, size_t b, size_t *result) {
*result = b + a;
return a > *result;
} | static int lodepng_addofl(size_t a, size_t b, size_t *result) {
*result = a + b;
return *result < a;
} | lodepng_addofl | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_assign_icc(LodePNGInfo *info, const char *name,
const unsigned char *profile,
unsigned int profile_size) {
if (!profile_size)
return 100;
info->iccp_name = alloc_string(name);
info->iccp_profile = (unsigned char *)lodepng_mal... | static unsigned lodepng_assign_icc(LodePNGInfo *info, const char *name,
const unsigned char *profile,
unsigned profile_size) {
if (profile_size == 0)
return 100;
info->iccp_name = alloc_string(name);
info->iccp_profile = (unsigned char *)l... | lodepng_assign_icc | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_buffer_file(unsigned char *out, size_t size,
const char *filename) {
FILE *file;
size_t readsize;
file = fopen(filename, "rb");
if (!file)
return 78;
readsize = fread(out, 1u, size, file);
fclose(file);
if (readsize == size)
return 0;
else
... | static unsigned lodepng_buffer_file(unsigned char *out, size_t size,
const char *filename) {
FILE *file;
size_t readsize;
file = fopen(filename, "rb");
if (!file)
return 78;
readsize = fread(out, 1, size, file);
fclose(file);
if (readsize != size)
return 78;
... | lodepng_buffer_file | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_can_have_alpha(const LodePNGColorMode *info) {
unsigned int result;
LOBYTE(result) = info->key_defined || lodepng_is_alpha_type(info) ||
lodepng_has_palette_alpha(info);
return (unsigned char)result;
} | unsigned lodepng_can_have_alpha(const LodePNGColorMode *info) {
return info->key_defined || lodepng_is_alpha_type(info) ||
lodepng_has_palette_alpha(info);
} | lodepng_can_have_alpha | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char lodepng_chunk_ancillary(const unsigned char *chunk) {
return (chunk[4] & 0x20) != 0;
} | unsigned char lodepng_chunk_ancillary(const unsigned char *chunk) {
return ((chunk[4] & 32) != 0);
} | lodepng_chunk_ancillary | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_chunk_append(unsigned char **out, size_t *outlength,
const unsigned char *chunk) {
unsigned int i;
unsigned int total_chunk_length;
size_t new_length;
unsigned char *new_buffer;
unsigned char *chunk_start;
total_chunk_length = lodepng_chunk_length(chun... | unsigned lodepng_chunk_append(unsigned char **out, size_t *outlength,
const unsigned char *chunk) {
unsigned i;
unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12;
unsigned char *chunk_start, *new_buffer;
size_t new_length = (*outlength) + total_chunk_length;
if (new_... | lodepng_chunk_append | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_chunk_check_crc(const unsigned char *chunk) {
unsigned int length;
unsigned int CRC;
length = lodepng_chunk_length(chunk);
CRC = lodepng_read32bitInt(&chunk[length + 8]);
return CRC != lodepng_crc32(chunk + 4, length + 4);
} | unsigned lodepng_chunk_check_crc(const unsigned char *chunk) {
unsigned length = lodepng_chunk_length(chunk);
unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]);
unsigned checksum = lodepng_crc32(&chunk[4], length + 4);
if (CRC != checksum)
return 1;
else
return 0;
} | lodepng_chunk_check_crc | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_chunk_create(unsigned char **out, size_t *outlength,
unsigned int length, const char *type,
const unsigned char *data) {
unsigned int i;
size_t new_length;
unsigned char *new_buffer;
unsigned char *chunk;
new_length = *o... | unsigned lodepng_chunk_create(unsigned char **out, size_t *outlength,
unsigned length, const char *type,
const unsigned char *data) {
unsigned i;
unsigned char *chunk, *new_buffer;
size_t new_length = (*outlength) + length + 12;
if (new_length < length... | lodepng_chunk_create | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char *lodepng_chunk_data(unsigned char *chunk) { return chunk + 8; } | unsigned char *lodepng_chunk_data(unsigned char *chunk) { return &chunk[8]; } | lodepng_chunk_data | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
const unsigned char *lodepng_chunk_data_const(const unsigned char *chunk) {
return chunk + 8;
} | const unsigned char *lodepng_chunk_data_const(const unsigned char *chunk) {
return &chunk[8];
} | lodepng_chunk_data_const | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char *lodepng_chunk_find(unsigned char *chunk,
const unsigned char *end, const char *type) {
while (1) {
if (end <= chunk + 12)
return 0;
if (lodepng_chunk_type_equals(chunk, type))
break;
chunk = lodepng_chunk_next(chunk);
}
return chunk;
} | unsigned char *lodepng_chunk_find(unsigned char *chunk,
const unsigned char *end,
const char type[5]) {
for (;;) {
if (chunk + 12 >= end)
return 0;
if (lodepng_chunk_type_equals(chunk, type))
return chunk;
chunk = lodepng_chun... | lodepng_chunk_find | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
const unsigned char *lodepng_chunk_find_const(const unsigned char *chunk,
const unsigned char *end,
const char *type) {
while (1) {
if (end <= chunk + 12)
return 0;
if (lodepng_chunk_type_equals(chunk, type))
... | const unsigned char *lodepng_chunk_find_const(const unsigned char *chunk,
const unsigned char *end,
const char type[5]) {
for (;;) {
if (chunk + 12 >= end)
return 0;
if (lodepng_chunk_type_equals(chunk, type))
... | lodepng_chunk_find_const | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_chunk_generate_crc(unsigned char *chunk) {
unsigned int length;
unsigned int CRC;
length = lodepng_chunk_length(chunk);
CRC = lodepng_crc32(chunk + 4, length + 4);
lodepng_set32bitInt(&chunk[length + 8], CRC);
} | void lodepng_chunk_generate_crc(unsigned char *chunk) {
unsigned length = lodepng_chunk_length(chunk);
unsigned CRC = lodepng_crc32(&chunk[4], length + 4);
lodepng_set32bitInt(chunk + 8 + length, CRC);
} | lodepng_chunk_generate_crc | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_chunk_length(const unsigned char *chunk) {
return lodepng_read32bitInt(chunk);
} | unsigned lodepng_chunk_length(const unsigned char *chunk) {
return lodepng_read32bitInt(&chunk[0]);
} | lodepng_chunk_length | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char *lodepng_chunk_next(unsigned char *chunk) {
if (*chunk == 0x89 && chunk[1] == 80 && chunk[2] == 78 && chunk[3] == 71 &&
chunk[4] == 13 && chunk[5] == 10 && chunk[6] == 26 && chunk[7] == 10) {
return chunk + 8;
} else {
return &chunk[lodepng_chunk_length(chunk) + 12];
}
} | unsigned char *lodepng_chunk_next(unsigned char *chunk) {
if (chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e &&
chunk[3] == 0x47 && chunk[4] == 0x0d && chunk[5] == 0x0a &&
chunk[6] == 0x1a && chunk[7] == 0x0a) {
return chunk + 8;
} else {
unsigned total_chunk_length = lodepng_chunk_le... | lodepng_chunk_next | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
const unsigned char *lodepng_chunk_next_const(const unsigned char *chunk) {
if (*chunk == 0x89 && chunk[1] == 80 && chunk[2] == 78 && chunk[3] == 71 &&
chunk[4] == 13 && chunk[5] == 10 && chunk[6] == 26 && chunk[7] == 10) {
return chunk + 8;
} else {
return &chunk[lodepng_chunk_length(chunk) + 12];
... | const unsigned char *lodepng_chunk_next_const(const unsigned char *chunk) {
if (chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e &&
chunk[3] == 0x47 && chunk[4] == 0x0d && chunk[5] == 0x0a &&
chunk[6] == 0x1a && chunk[7] == 0x0a) {
return chunk + 8;
} else {
unsigned total_chunk_length ... | lodepng_chunk_next_const | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char lodepng_chunk_private(const unsigned char *chunk) {
return (chunk[6] & 0x20) != 0;
} | unsigned char lodepng_chunk_private(const unsigned char *chunk) {
return ((chunk[6] & 32) != 0);
} | lodepng_chunk_private | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char lodepng_chunk_safetocopy(const unsigned char *chunk) {
return (chunk[7] & 0x20) != 0;
} | unsigned char lodepng_chunk_safetocopy(const unsigned char *chunk) {
return ((chunk[7] & 32) != 0);
} | lodepng_chunk_safetocopy | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_chunk_type(char *type, const unsigned char *chunk) {
unsigned int i;
for (i = 0; i != 4; ++i)
type[i] = chunk[i + 4];
type[4] = 0;
} | void lodepng_chunk_type(char type[5], const unsigned char *chunk) {
unsigned i;
for (i = 0; i != 4; ++i)
type[i] = (char)chunk[4 + i];
type[4] = 0;
} | lodepng_chunk_type | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned char lodepng_chunk_type_equals(const unsigned char *chunk,
const char *type) {
if (lodepng_strlen(type) != 4)
return 0;
return chunk[4] == *type && chunk[5] == type[1] && chunk[6] == type[2] &&
chunk[7] == type[3];
} | unsigned char lodepng_chunk_type_equals(const unsigned char *chunk,
const char *type) {
if (lodepng_strlen(type) != 4)
return 0;
return (chunk[4] == type[0] && chunk[5] == type[1] && chunk[6] == type[2] &&
chunk[7] == type[3]);
} | lodepng_chunk_type_equals | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_clear_icc(LodePNGInfo *info) {
string_cleanup(&info->iccp_name);
lodepng_free(info->iccp_profile);
info->iccp_profile = 0;
info->iccp_profile_size = 0;
info->iccp_defined = 0;
} | void lodepng_clear_icc(LodePNGInfo *info) {
string_cleanup(&info->iccp_name);
lodepng_free(info->iccp_profile);
info->iccp_profile = NULL;
info->iccp_profile_size = 0;
info->iccp_defined = 0;
} | lodepng_clear_icc | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_clear_itext(LodePNGInfo *info) { LodePNGIText_cleanup(info); } | void lodepng_clear_itext(LodePNGInfo *info) { LodePNGIText_cleanup(info); } | lodepng_clear_itext | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_clear_text(LodePNGInfo *info) { LodePNGText_cleanup(info); } | void lodepng_clear_text(LodePNGInfo *info) { LodePNGText_cleanup(info); } | lodepng_clear_text | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_color_mode_alloc_palette(LodePNGColorMode *info) {
size_t i;
info->palette = (unsigned char *)lodepng_realloc(info->palette, 0x400u);
if (info->palette) {
for (i = 0; i != 256; ++i) {
info->palette[4 * i] = 0;
info->palette[4 * i + 1] = 0;
info->palette[4 * i + 2] = 0;
in... | void lodepng_color_mode_alloc_palette(LodePNGColorMode *info) {
size_t i;
info->palette = (unsigned char *)lodepng_realloc(info->palette, 1024);
if (!info->palette)
return;
for (i = 0; i != 256; ++i) {
info->palette[i * 4 + 0] = 0;
info->palette[i * 4 + 1] = 0;
info->palette[i * 4 + 2] = 0;
... | lodepng_color_mode_alloc_palette | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_color_mode_cleanup(LodePNGColorMode *info) {
lodepng_palette_clear(info);
} | void lodepng_color_mode_cleanup(LodePNGColorMode *info) {
lodepng_palette_clear(info);
} | lodepng_color_mode_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_color_mode_copy(LodePNGColorMode *dest,
const LodePNGColorMode *source) {
unsigned char *palette;
long v3;
size_t i;
lodepng_color_mode_cleanup(dest);
palette = source->palette;
*(_QWORD *)&dest->colortype = *(_QWORD *)&source->colortype;
dest->pa... | unsigned lodepng_color_mode_copy(LodePNGColorMode *dest,
const LodePNGColorMode *source) {
size_t i;
lodepng_color_mode_cleanup(dest);
*dest = *source;
if (source->palette) {
dest->palette = (unsigned char *)lodepng_malloc(1024);
if (!dest->palette && source->palettesize... | lodepng_color_mode_copy | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
int lodepng_color_mode_equal(const LodePNGColorMode *a,
const LodePNGColorMode *b) {
size_t i;
if (a->colortype != b->colortype)
return 0;
if (a->bitdepth != b->bitdepth)
return 0;
if (a->key_defined != b->key_defined)
return 0;
if (!a->key_defined)
goto LABEL_14;... | static int lodepng_color_mode_equal(const LodePNGColorMode *a,
const LodePNGColorMode *b) {
size_t i;
if (a->colortype != b->colortype)
return 0;
if (a->bitdepth != b->bitdepth)
return 0;
if (a->key_defined != b->key_defined)
return 0;
if (a->key_defined) {
... | lodepng_color_mode_equal | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_color_mode_init(LodePNGColorMode *info) {
info->key_defined = 0;
info->key_b = 0;
info->key_g = info->key_b;
info->key_r = info->key_g;
info->colortype = LodePNGColorType_LCT_RGBA;
info->bitdepth = 8;
info->palette = 0;
info->palettesize = 0;
} | void lodepng_color_mode_init(LodePNGColorMode *info) {
info->key_defined = 0;
info->key_r = info->key_g = info->key_b = 0;
info->colortype = LCT_RGBA;
info->bitdepth = 8;
info->palette = 0;
info->palettesize = 0;
} | lodepng_color_mode_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
LodePNGColorMode *lodepng_color_mode_make(LodePNGColorMode *__return_ptr retstr,
LodePNGColorType colortype,
unsigned int bitdepth) {
lodepng_color_mode_init(retstr);
retstr->colortype = colortype;
retstr->bitdepth = bitdepth;
r... | LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype,
unsigned bitdepth) {
LodePNGColorMode result;
lodepng_color_mode_init(&result);
result.colortype = colortype;
result.bitdepth = bitdepth;
return result;
} | lodepng_color_mode_make | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_color_stats_add(LodePNGColorStats *stats, unsigned int r,
unsigned int g, unsigned int b, unsigned int a) {
short aa;
short ba;
short ga;
LodePNGColorMode mode;
unsigned char image[8];
unsigned long v10;
ga = g;
ba = b;
aa = a;
v10 = __readfsqword(0x28u);
... | static void lodepng_color_stats_add(LodePNGColorStats *stats, unsigned r,
unsigned g, unsigned b, unsigned a) {
unsigned char image[8];
LodePNGColorMode mode;
lodepng_color_mode_init(&mode);
image[0] = r >> 8;
image[1] = r;
image[2] = g >> 8;
image[3] = g;
image[4] = ... | lodepng_color_stats_add | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_color_stats_init(LodePNGColorStats *stats) {
stats->colored = 0;
stats->key = 0;
stats->key_b = 0;
stats->key_g = stats->key_b;
stats->key_r = stats->key_g;
stats->alpha = 0;
stats->numcolors = 0;
stats->bits = 1;
stats->numpixels = 0;
stats->allow_palette = 1;
stats->allow_greyscale ... | void lodepng_color_stats_init(LodePNGColorStats *stats) {
stats->colored = 0;
stats->key = 0;
stats->key_r = stats->key_g = stats->key_b = 0;
stats->alpha = 0;
stats->numcolors = 0;
stats->bits = 1;
stats->numpixels = 0;
stats->allow_palette = 1;
stats->allow_greyscale = 1;
} | lodepng_color_stats_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_compress_settings_init(LodePNGCompressSettings *settings) {
settings->btype = 2;
settings->use_lz77 = 1;
settings->windowsize = 2048;
settings->minmatch = 3;
settings->nicematch = 128;
settings->lazymatching = 1;
settings->custom_zlib = 0;
settings->custom_deflate = 0;
settings->custom_co... | void lodepng_compress_settings_init(LodePNGCompressSettings *settings) {
settings->btype = 2;
settings->use_lz77 = 1;
settings->windowsize = DEFAULT_WINDOWSIZE;
settings->minmatch = 3;
settings->nicematch = 128;
settings->lazymatching = 1;
settings->custom_zlib = 0;
settings->custom_deflate = 0;
set... | lodepng_compress_settings_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void lodepng_compute_color_stats(LodePNGColorStats *stats,
const unsigned char *in, unsigned int w,
unsigned int h,
const LodePNGColorMode *mode_in) {
unsigned int v5;
unsigned int v6;
bool v7;
bool v8;
unsigned... | void lodepng_compute_color_stats(LodePNGColorStats *stats,
const unsigned char *in, unsigned w,
unsigned h, const LodePNGColorMode *mode_in) {
size_t i;
ColorTree tree;
size_t numpixels = (size_t)w * (size_t)h;
unsigned colored_done = lodepng_is... | lodepng_compute_color_stats | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int lodepng_convert(unsigned char *out, const unsigned char *in,
const LodePNGColorMode *mode_out,
const LodePNGColorMode *mode_in, unsigned int w,
unsigned int h) {
unsigned short r;
unsigned short g;
unsigned short b... | unsigned lodepng_convert(unsigned char *out, const unsigned char *in,
const LodePNGColorMode *mode_out,
const LodePNGColorMode *mode_in, unsigned w,
unsigned h) {
size_t i;
ColorTree tree;
size_t numpixels = (size_t)w * (size_t)h;
unsign... | lodepng_convert | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.