Lines Matching refs:mz_uint8

188 …#define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *…
189mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_ui…
222 mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) in mz_crc32()
228 …crcu32 = ~crcu32; while (buf_len--) { mz_uint8 b = *ptr++; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu3… in mz_crc32()
402 mz_uint8 m_dict[TINFL_LZ_DICT_SIZE];
667 …mpress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_b… in tinfl_decompress()
673 static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; in tinfl_decompress()
677 const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; in tinfl_decompress()
678 mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; in tinfl_decompress()
708 *pOut_buf_cur++ = (mz_uint8)dist; in tinfl_decompress()
737 mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; in tinfl_decompress()
744 …; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } in tinfl_decompress()
776 …6, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } in tinfl_decompress()
793 mz_uint8 *pSrc; in tinfl_decompress()
802 *pOut_buf_cur++ = (mz_uint8)counter; in tinfl_decompress()
833 pOut_buf_cur[0] = (mz_uint8)counter; in tinfl_decompress()
840 pOut_buf_cur[1] = (mz_uint8)sym2; in tinfl_decompress()
873 const mz_uint8 *pSrc_end = pSrc + (counter & ~7); in tinfl_decompress()
922 const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; in tinfl_decompress()
948 …= tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBu… in tinfl_decompress_mem_to_heap()
971 …status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, ( in tinfl_decompress_mem_to_mem()
979 mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; in tinfl_decompress_mem_to_callback()
986 …tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_siz… in tinfl_decompress_mem_to_callback()
1016 static const mz_uint8 s_tdefl_len_extra[256] = {
1022 static const mz_uint8 s_tdefl_small_dist_sym[512] = {
1036 static const mz_uint8 s_tdefl_small_dist_extra[512] = {
1046 static const mz_uint8 s_tdefl_large_dist_sym[128] = {
1051 static const mz_uint8 s_tdefl_large_dist_extra[128] = {
1132 … num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); in tdefl_optimize_huffman_table()
1150 *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \
1161 …acked_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count…
1168 …acked_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3)…
1170 …acked_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11…
1173 static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4…
1178mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_size… in tdefl_start_dynamic_block()
1195 mz_uint8 code_size = code_sizes_to_pack[i]; in tdefl_start_dynamic_block()
1240 mz_uint8 *p = &d->m_huff_code_sizes[0][0]; in tdefl_start_static_block()
1261 mz_uint8 *pLZ_codes; in tdefl_compress_lz_codes()
1262 mz_uint8 *pOutput_buf = d->m_pOutput_buf; in tdefl_compress_lz_codes()
1263 mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; in tdefl_compress_lz_codes()
1350 mz_uint8 *pLZ_codes; in tdefl_compress_lz_codes()
1404 mz_uint8 *pSaved_output_buf; in tdefl_flush_block()
1407mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_bu… in tdefl_flush_block()
1416 *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); in tdefl_flush_block()
1478 *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; in tdefl_flush_block()
1485 memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); in tdefl_flush_block()
1530 … if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) … in tdefl_find_match()
1542 const mz_uint8 *s = d->m_dict + pos, *p, *q; in tdefl_find_match()
1543 mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; in tdefl_find_match()
1572 mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; in tdefl_compress_fast()
1600 mz_uint8 *pCur_dict = d->m_dict + cur_pos; in tdefl_compress_fast()
1613 …)(p - (const mz_uint16 *)pCur_dict) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q); in tdefl_compress_fast()
1620 *pLZ_code_buf++ = (mz_uint8)first_trigram; in tdefl_compress_fast()
1621 *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); in tdefl_compress_fast()
1622 d->m_huff_count[0][(mz_uint8)first_trigram]++; in tdefl_compress_fast()
1633 pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN); in tdefl_compress_fast()
1636 *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80); in tdefl_compress_fast()
1647 *pLZ_code_buf++ = (mz_uint8)first_trigram; in tdefl_compress_fast()
1648 *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); in tdefl_compress_fast()
1649 d->m_huff_count[0][(mz_uint8)first_trigram]++; in tdefl_compress_fast()
1674 mz_uint8 lit = d->m_dict[cur_pos]; in tdefl_compress_fast()
1678 *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); in tdefl_compress_fast()
1706 static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, mz_uint8 lit) in tdefl_record_literal()
1710 …*d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); if (--d->m_num_flags_left == 0) { d->m_num_fla… in tdefl_record_literal()
1722 d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN); in tdefl_record_match()
1725 d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF); in tdefl_record_match()
1726 d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3; in tdefl_record_match()
1728 …*d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->… in tdefl_record_match()
1738 const mz_uint8 *pSrc = d->m_pSrc; size_t src_buf_left = d->m_src_buf_left; in tdefl_compress_normal()
1750 const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process; in tdefl_compress_normal()
1755mz_uint8 c = *pSrc++; d->m_dict[dst_pos] = c; if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) d->m_dict[T… in tdefl_compress_normal()
1765 mz_uint8 c = *pSrc++; in tdefl_compress_normal()
1789 mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK]; in tdefl_compress_normal()
1806 tdefl_record_literal(d, (mz_uint8)d->m_saved_lit); in tdefl_compress_normal()
1858 *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; in tdefl_flush_output_buffer()
1864 … memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n); in tdefl_flush_output_buffer()
1886 d->m_pSrc = (const mz_uint8 *)(pIn_buf); d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0; in tdefl_compress()
1918 …adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uin… in tdefl_compress()
1977 mz_uint8 *m_pBuf;
1987 size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE; in tdefl_output_buffer_putter()
1989 pNew_buf = (mz_uint8*)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE; in tdefl_output_buffer_putter()
1992 memcpy((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size; in tdefl_output_buffer_putter()
2009 out_buf.m_pBuf = (mz_uint8*)pOut_buf; out_buf.m_capacity = out_buf_len; in tdefl_compress_mem_to_mem()
2047 …f.m_capacity = 57+MZ_MAX(64, (1+bpl)*h); if (NULL == (out_buf.m_pBuf = (mz_uint8*)MZ_MALLOC(out_bu… in tdefl_write_image_to_png_file_in_memory_ex()
2052 …ess_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, (mz_uint8*)pImage + (flip ?… in tdefl_write_image_to_png_file_in_memory_ex()
2057 static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06}; in tdefl_write_image_to_png_file_in_memory_ex()
2058mz_uint8 pnghdr[41]={0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x… in tdefl_write_image_to_png_file_in_memory_ex()
2059 …0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,chans[num_chans],0,0,0,0,0,0,0, in tdefl_write_image_to_png_file_in_memory_ex()
2060 …(mz_uint8)(*pLen_out>>24),(mz_uint8)(*pLen_out>>16),(mz_uint8)(*pLen_out>>8),(mz_uint8)*pLen_out,0… in tdefl_write_image_to_png_file_in_memory_ex()
2061 …(MZ_CRC32_INIT,pnghdr+12,17); for (i=0; i<4; ++i, c<<=8) ((mz_uint8*)(pnghdr+29))[i]=(mz_uint8)(c>… in tdefl_write_image_to_png_file_in_memory_ex()
2066 …Len_out+4); for (i=0; i<4; ++i, c<<=8) (out_buf.m_pBuf+out_buf.m_size-16)[i] = (mz_uint8)(c >> 24); in tdefl_write_image_to_png_file_in_memory_ex()
2265 …memcpy((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_eleme… in mz_zip_array_push_back()
2340 MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8)); in mz_zip_reader_init_internal()
2348 …const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCen… in mz_zip_reader_filename_less()
2349 …const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCen… in mz_zip_reader_filename_less()
2351 mz_uint8 l = 0, r = 0; in mz_zip_reader_filename_less()
2412 const mz_uint8 *p; in mz_zip_reader_read_central_dir()
2413 mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; mz_uint8 *pBuf = (mz_uint8 *)buf_u32; in mz_zip_reader_read_central_dir()
2477 p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p; in mz_zip_reader_read_central_dir()
2483 …m_pState->m_central_dir_offsets, mz_uint32, i) = (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState-… in mz_zip_reader_read_central_dir()
2526 memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s); in mz_zip_mem_read_func()
2596 static MZ_FORCEINLINE const mz_uint8 *mz_zip_reader_get_cdh(mz_zip_archive *pZip, mz_uint file_inde… in mz_zip_reader_get_cdh()
2600 …return &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip-… in mz_zip_reader_get_cdh()
2606 const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); in mz_zip_reader_is_file_encrypted()
2616 const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); in mz_zip_reader_is_file_a_directory()
2641 const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); in mz_zip_reader_file_stat()
2676 const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); in mz_zip_reader_get_filename()
2701 …const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCen… in mz_zip_reader_filename_compare()
2703 mz_uint8 l = 0, r = 0; in mz_zip_reader_filename_compare()
2748 …const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_A… in mz_zip_reader_locate_file()
2783 …HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)l… in mz_zip_reader_extract_to_mem_no_alloc()
2830 …return ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) != 0) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)… in mz_zip_reader_extract_to_mem_no_alloc()
2839 pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; in mz_zip_reader_extract_to_mem_no_alloc()
2848 pRead_buf = (mz_uint8 *)pUser_read_buf; in mz_zip_reader_extract_to_mem_no_alloc()
2885 …tatus = tinfl_decompress(&inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 in mz_zip_reader_extract_to_mem_no_alloc()
2894 …if ((out_buf_ofs != file_stat.m_uncomp_size) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (… in mz_zip_reader_extract_to_mem_no_alloc()
2925 const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); in mz_zip_reader_extract_to_heap()
2973 …HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)l… in mz_zip_reader_extract_to_callback()
3009 pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; in mz_zip_reader_extract_to_callback()
3036 …file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)file_stat.m_comp… in mz_zip_reader_extract_to_callback()
3053 … file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail); in mz_zip_reader_extract_to_callback()
3077mz_uint8 *pWrite_buf_cur = (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); in mz_zip_reader_extract_to_callback()
3093 …status = tinfl_decompress(&inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz… in mz_zip_reader_extract_to_callback()
3206 static void mz_write_le16(mz_uint8 *p, mz_uint16 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8)… in mz_write_le16()
3207 …id mz_write_le32(mz_uint8 *p, mz_uint32 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); p[2] =… in mz_write_le32()
3208 #define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v))
3209 #define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
3235 MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8)); in mz_zip_writer_init()
3260 memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n); in mz_zip_heap_write_func()
3396 static mz_bool mz_zip_writer_create_local_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint1… in mz_zip_writer_create_local_dir_header()
3414 static mz_bool mz_zip_writer_create_central_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uin… in mz_zip_writer_create_central_dir_header()
3440 mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; in mz_zip_writer_add_to_central_dir()
3506 mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; in mz_zip_writer_add_mem_ex()
3584 uncomp_crc32 = (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8*)pBuf, buf_size); in mz_zip_writer_add_mem_ex()
3657 mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; in mz_zip_writer_add_file()
3738 uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n); in mz_zip_writer_add_file()
3776 uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size); in mz_zip_writer_add_file()
3834 …HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)l… in mz_zip_writer_add_from_zip_reader()
3835 mz_uint8 central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; in mz_zip_writer_add_from_zip_reader()
3838 void *pBuf; const mz_uint8 *pSrc_central_header; in mz_zip_writer_add_from_zip_reader()
3956 mz_uint8 hdr[MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE]; in mz_zip_writer_finalize_archive()