Repository navigation
Conversation
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Required functions are definited into miniz_zip.c but only within: The isse emerges when appling the "RFC-1952 implementation" patchset. Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Patchset revision v2, 2026-11-23 This implementation of RFC-1952 for miniz has been made after two unsuccessful Kimi coding sections. The task is particularly suitable for an artificial intelligence because the RFC-1952 is a standard precisely documented, therefore its integration in miniz should have been reasonable to achieve, in principle. The third attempt achieved the goal after Kimi had been instructed to not fit-in the RFC-1952 into the RFC-1950's dedicated fields. I keep this part separate for a matter of log, the others will follow as fixing patches. Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Patchset revision v2, 2026-11-23 The RFC-1952 support is not self-sufficient yet. It requires that each GZIP stream is provided one after another. This little change helps but it doesn't allow miniz to autonomously inflate the whole stream as-is. Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Patchset revision v2, 2026-11-23 miniz: drain dictionary before reporting GZIP stream end When inflating concatenated RFC-1952 GZIP streams, a stream ending or error condition can occur while decompressed bytes are still sitting in the dictionary buffer (m_dict_avail). Return MZ_BUF_ERROR so the caller can flush remaining output first, and allow re-entering inflate to drain those leftover bytes before moving on to the next stream (e.g., via inflateEnd + inflateInit2 with window_bits = 15 + 16). This addresses multi-stream GZIP decompression in callers like ptgzip without mixing in ZIP64 extra-field (0x0001) handling; RFC-1952 support remains under active testing across split/concatenated buffers. Sources: related update of the 'readme.md' and this commit: - robang74/pgunzip@2be87f79fa9ade14dbab17474 Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
The RFC-1952 support has been recently added but is not deeply tested, yet. An example of use can be found starting from this commit here: - robang74/pgunzip@2be87f79fa9ade14dbab17474 Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Closed
Contributor
Author
|
These two commits are for triggering the actions, and not supposed to be integrated
While these two are proposed changes, to evaluate, not neccesarly to integrate upstream:
Instead, these are two commits which are *suggested to be upstreamed (warnings):
There others files in |
robang74
force-pushed
the
rfc1952.pr2
branch
2 times, most recently
from
November 24, 2026 09:52
ee09be2 to
7ba8d37
Compare
Contributor
Author
|
DONE: repeat the tests with 'pgunzip' that created the event for this patch.
or make pmgzip
list=$(find /bin/ -type f | sort); for i in $list
do { ./pmgzip $i -c -1 | ./pmgzip -dc >/dev/null; } ||
echo $i >&2; done # expected output: none, no errors |
robang74
force-pushed
the
rfc1952.pr2
branch
from
November 24, 2026 11:50
7ba8d37 to
df1839f
Compare
- miniz.c,.h,miniz_zip.c: fixing amalgamation.sh not-blocking bugs - miniz_tinfl.c: lazy initialisation to explict zero 1. DONE: miniz_zip.c, read zip64 extended information field into comp_size ------------------------------------------------------------------------------- Zip reader zip64 local header offset out of bounds ------------------------------------------------------------------------------- /home/roberto/robang74/miniz/tests/main.cpp:415 ............................................................................... /home/roberto/robang74/miniz/tests/main.cpp:439: FAILED: REQUIRE( mz_zip_reader_init_mem(&zip, archive, sizeof(archive), 0) ) with expansion: 0 =============================================================================== test cases: 10 | 9 passed | 1 failed assertions: 134735 | 134734 passed | 1 failed 2. DONE: repeat the tests with 'pgunzip' that created the event for this patch. - https://github.com/robang74/pgunzip commit #`b7c44ee` (tag:`tzcmdok`) - `make pmgzip && make testcmd TZCMD=./pmgzip` (OK) or make pmgzip list=$(find /bin/ -type f | sort); for i in $list do { ./pmgzip $i -c -1 | ./pmgzip -dc >/dev/null; } || echo $i >&2; done # expected output: none, no errors 3. TODO: not investigated, yet [ 13%] Building C object CMakeFiles/miniz.dir/miniz_tinfl.c.o /usr/bin/cc -D_GNU_SOURCE -I/home/roberto/robang74/miniz -I/home/roberto/robang74/miniz/build -Wshadow -Wformat=2 -Wall -Wno-overlength-strings -pedantic -O3 -DNDEBUG -std=gnu90 -MD -MT CMakeFiles/miniz.dir/miniz_tinfl.c.o -MF CMakeFiles/miniz.dir/miniz_tinfl.c.o.d -o CMakeFiles/miniz.dir/miniz_tinfl.c.o -c /home/roberto/robang74/miniz/miniz_tinfl.c /home/roberto/robang74/miniz/miniz_tinfl.c: In function ‘tinfl_decompress’: /home/roberto/robang74/miniz/miniz_tinfl.c:705:28: warning: ‘crc32’ may be used uninitialized in this function [-Wmaybe-uninitialized] 705 | r->m_z_adler32 = crc32; | ~~~~~~~~~~~~~~~^~~~~~~ /home/roberto/robang74/miniz/miniz_tinfl.c:235:22: warning: ‘flg’ may be used uninitialized in this function [-Wmaybe-uninitialized] 235 | mz_uint8 flg = 0; | ^~~ /home/roberto/robang74/miniz/miniz_tinfl.c:273:28: warning: ‘xlen’ may be used uninitialized in this function [-Wmaybe-uninitialized] 273 | while (xlen--) | Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
robang74
8000
force-pushed
the
rfc1952.pr2
branch
from
November 24, 2026 12:19
df1839f to
d2c63ef
Compare
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 1952 support added (v2)
RFC 1952 support added, it does not include the filename and the date/time of the archive creation. Apart from these two details, which is "gzip legit" to skip, it seems to be working. The v2 is better organised and based on the last
HEAD(at the time of updating the patchset into the second version).The git commit of the part n.4 shows which are the open topic about adding RFC 1952 to miniz. Therefore this PR couldn't be considered completed but in a good shape for another round of testing and refinement. The TODO n.1 is on me, and I hope someone in the meantime would suggest how to deal with that nasty warning. Which happens in a specific case, therefore is less straightforward to face.