Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deflate and zip text files with zlib and minizip #39

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

enzoevers
Copy link
Owner

No description provided.

@enzoevers enzoevers self-assigned this Dec 27, 2024
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch from 44ca145 to aa723bb Compare December 29, 2024 21:50
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 6 times, most recently from 37c225f to a06fa20 Compare January 4, 2025 19:26
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 5 times, most recently from 3291175 to 8e23e1d Compare January 15, 2025 20:17
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 10 times, most recently from 2052581 to a4b6e54 Compare January 18, 2025 21:17
@enzoevers enzoevers marked this pull request as ready for review January 18, 2025 21:24
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch from a4b6e54 to ed513b9 Compare January 18, 2025 21:45
@enzoevers
Copy link
Owner Author

All unit tests in release and debug builds pass on the Zybo board as well.

@enzoevers
Copy link
Owner Author

enzoevers commented Jan 18, 2025

The generated .zip file from test_ZippingAndUnzippingRawTextGivesIdenticalOutput_MultiFileAndSubDir can be extracted using 7zip on windows. However, while the text files are extracted correctly and can be read, there are messages about failing to validating the CRC.

Extracting with the built-in extracter from the windows file explorer cannot be done for the files. While the folder are extracted and created, no files are in them. The message says: 0x80004005: Unspecified error.

@enzoevers enzoevers marked this pull request as draft January 18, 2025 21:53
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 3 times, most recently from df47745 to 507e1d1 Compare January 19, 2025 10:49
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 2 times, most recently from ccf75c4 to 339df97 Compare January 19, 2025 11:12
@enzoevers
Copy link
Owner Author

enzoevers commented Jan 19, 2025

There is a problem with the file size returned on 32-bit systems. This will be resolved with: #42

For example, on the Zybo board, only the test test_ZippingAndUnzippingRawTextGivesIdenticalOutput_CanZipAndUnZipFileOf6GB fails.

@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 14 times, most recently from 7c89ab0 to ffa905b Compare January 19, 2025 18:59
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch from ffa905b to ccf01b7 Compare January 19, 2025 19:16
@enzoevers enzoevers linked an issue Jan 19, 2025 that may be closed by this pull request

#else

ZIP_RETURN_CODES ZipDirectory_Posix(zipFile zFile,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments in this function

@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch 2 times, most recently from 09787ac to 60ef187 Compare January 19, 2025 20:22
@enzoevers enzoevers force-pushed the deflate-zip-text-files-zlib-minizip branch from 60ef187 to ad4608b Compare January 20, 2025 19:17
@enzoevers
Copy link
Owner Author

On Zybo it failed with:

BasicLinuxZybo:~$ ./Test_Release ./Files/ $(pwd)/ true
Unity test run 1 of 1
................................................................................                           .........................Expected (sizeToCreate): 6000000000
Actual (fileSize): 3802181632
D:\a\CompressionOffloading\CompressionOffloading\CoDeLib\Test\src\TestFileUtils.                           c:1106:TEST(TestFileUtils, test_GetFileSizeInBytes_ReturnsCorrectSizeOfFile_Larg                           eFile):FAIL: File size does not match expected size.
.....Could not open SomePath/someZipPath.zip for unzipping
......................D:\a\CompressionOffloading\CompressionOffloading\CoDeLib\Test\src\TestZipMinizipUnZipMinizip.c:85:TEST(TestZipMinizipUnZipMinizip, test_ZippingAndUnzippingRawTextGivesIdenticalOutput_CanZipAndUnZipFileOf6GB):FAIL: Expected 0 Was 1
..............

-----------------------
146 Tests 2 Failures 0 Ignored
FAIL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant