kkovaacs / miniz Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/miniz
Automatically exported from code.google.com/p/miniz
using a 32bit unsigned int instead of a 64bit unsigned long fixes the problem.
-mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len);
+mz_uint32 mz_crc32(mz_uint32 crc, const unsigned char *ptr, size_t buf_len);
also the typedef for mz_uint32 must be moved to preceed this.
Original issue reported on code.google.com by [email protected]
on 24 Feb 2012 at 2:28
What steps will reproduce the problem?
1. Use tdm-mingw32 to compile miniz on win32
What is the expected output? What do you see instead?
Excepting quiet compilation,
got some undefined references instead.
What version of the product are you using? On what operating system?
1.11 / win32
Please provide any additional information below.
My solution:
add
#define __forceinline inline
#include <time.h>
at the beginning of the source.
and
mingw32 doesn't have _fseeki64/_ftelli64,
therefore I changed the corresponding macro to ftello64/fseeko64 as
alternatives. They seems work the same way. I hope :)
#if defined(__MINGW32__)
#define MZ_FTELL64 ftello64
#define MZ_FSEEK64 fseeko64
#else
#define MZ_FTELL64 _ftelli64
#define MZ_FSEEK64 _fseeki64
#endif
Original issue reported on code.google.com by [email protected]
on 30 Oct 2011 at 9:07
What steps will reproduce the problem?
1. port the example buftest.c and xzminidec.c from the xz-embedded library to
miniz with a 1 byte input and output buffer
What is the expected output? What do you see instead?
I see duplicated bytes in the output
What version of the product are you using? On what operating system?
v111b
Please provide any additional information below.
I think porting the test/examples/demos from the xz-embedded or the xz library
proper and/or other decompression libraries and including them into miniz would
be a good idea.
Original issue reported on code.google.com by [email protected]
on 20 Jul 2011 at 6:21
What steps will reproduce the problem?
1. Complie attached test_crash.c with latest miniz.
2. Run it against attached test.zip.
What is the expected output? What do you see instead?
Expected is MANIFEST.MF contents since test.zip is a valid archive.
However it fails to decompress file contents.
What version of the product are you using? On what operating system?
Miniz 1.11b, Win7 and GNU/Linux (gcc 4.1.2)
Please provide any additional information below.
I've discovered that failure occurs in tinfl_decompress() routine:
...
TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]);
num_extra = s_dist_extra[dist]; dist = s_dist_base[dist];
if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; }
dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
{
TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
}
...
dist occures to be 2049 which is much greater than dist_from_out_buf_start thus
decompression fails.
Original issue reported on code.google.com by [email protected]
on 22 Nov 2011 at 6:59
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.