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

file: use 64bit indexing for block size #296

Merged
merged 2 commits into from
Sep 5, 2024
Merged

file: use 64bit indexing for block size #296

merged 2 commits into from
Sep 5, 2024

Conversation

Gottox
Copy link
Owner

@Gottox Gottox commented Sep 5, 2024

This patch changes the block size and block compression functions to use 64bit indexing. From reading the specs, I came to the conclusion that the block size table can be larger than 4Gi entries. (to be exact, I believe that the worst case block table is:

UINT64_MAX (max file size) / 4096 (minimal block size)

While we don't support files that large yet, we lay the foundation to support them in the future.

This patch changes the block size and block compression functions to use
64bit indexing. From reading the specs, I came to the conclusion that
the block size table can be larger than 4Gi entries. (to be exact, I
believe that the worst case block table is:

	UINT64_MAX (max file size) / 4096 (minimal block size)

While we don't support files that large yet, we lay the foundation to
support them in the future.
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 64.08%. Comparing base (058077b) to head (4f56e30).

Files with missing lines Patch % Lines
tools/src/stat.c 0.00% 4 Missing ⚠️
libsqsh/src/file/file_iterator.c 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
- Coverage   64.10%   64.08%   -0.03%     
==========================================
  Files          75       75              
  Lines        5893     5898       +5     
  Branches      903      903              
==========================================
+ Hits         3778     3780       +2     
- Misses       1577     1580       +3     
  Partials      538      538              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Sep 5, 2024

@Gottox Gottox merged commit a2c1f41 into main Sep 5, 2024
16 checks passed
@Gottox Gottox deleted the fix/big-files branch September 5, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant