You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not very knowledge in compression and if you could point me in the right direction I would greatly appreciate it!
I've came across what is called zlibx a variation of zlib, where it carries the inflate changes as follow:
#define MOVE_30_TO_288 288 // the original is 30, this is probably the max
/* extra bits and base tables for length codes */
unsigned char length_bits[MOVE_30_TO_288];
unsigned short length_base[MOVE_30_TO_288];
/* extra bits and base tables for distance codes */
unsigned char dist_bits[MOVE_30_TO_288];
unsigned short dist_base[MOVE_30_TO_288];
static void tinf_build_bits_base(unsigned char *bits, unsigned short *base, int delta, int first)
{
int i, sum;
/* build bits table */
for (i = 0; i < delta; ++i) bits[i] = 0;
for (i = 0; i < MOVE_30_TO_288 - delta; ++i) bits[i + delta] = i / delta;
/* build base table */
for (sum = first, i = 0; i < MOVE_30_TO_288; ++i)
{
base[i] = sum;
sum += 1 << bits[i];
}
}
I've looked at DotNetZip source of the Zlib portion but the code is so complex, I don't even know where to start, more over I do see some initializes with 288, for example
I recommend checking https://github.com/haf/DotNetZip.Semverd as it appears this project is simply a snapshot, whilst the other project has full history, and at least a minimal amount of maintenance.
Hi @DinoChiesa ,
I am not very knowledge in compression and if you could point me in the right direction I would greatly appreciate it!
I've came across what is called zlibx a variation of zlib, where it carries the inflate changes as follow:
So instead of using 30 it uses 288, the above code comes from https://bitbucket.org/jibsen/tinf/src/d4327ed5fe3826620e2c53c292d456d5cb6b5932/src/tinflate.c?at=default&fileviewer=file-view-default with the changes mentioned above for
MOVE_30_TO_288
.I've looked at DotNetZip source of the Zlib portion but the code is so complex, I don't even know where to start, more over I do see some initializes with 288, for example
DotNetZip/Zlib/InfTree.cs
Line 355 in 4b120bc
DotNetZip/Zlib/Zlib.cs
Line 363 in 7ac10dc
I wanted to know if you could point me which parts of Zlib from DotNetZip I would have to change to reflect the above.
If you could share me anything on this matter I would appreciate.
Thanks.
The text was updated successfully, but these errors were encountered: