Skip to content

Provide compressed length information for content files#146

Merged
vers-one merged 1 commit intomasterfrom
compressed-length
Mar 14, 2026
Merged

Provide compressed length information for content files#146
vers-one merged 1 commit intomasterfrom
compressed-length

Conversation

@vers-one
Copy link
Copy Markdown
Owner

Provide compressed length information for content files

This is:

  • a bug fix
  • an enhancement

Related issue: #144

Description

This pull request adds the CompressedLength property to the IZipFileEntry interface. The new property represents the compressed size of the entry in the ZIP archive.

Testing steps

Use the following code to test the new property:

string filePath = ...
using (EpubBookRef bookRef = EpubReader.OpenBook(filePath))
{
    string firstHtmlEntryFilePath = bookRef.Content.Html.Local[0].FilePath;
    IZipFileEntry firstHtmlEntry = bookRef.EpubFile.GetEntry(firstHtmlEntryFilePath)!;
    Console.WriteLine($"FilePath: {firstHtmlEntryFilePath}");
    Console.WriteLine($"Length: {firstHtmlEntry.Length}");
    Console.WriteLine($"CompressedLength: {firstHtmlEntry.CompressedLength}");
}

@vers-one vers-one self-assigned this Mar 14, 2026
@vers-one vers-one force-pushed the compressed-length branch from 5959e6e to 1dfe3ee Compare March 14, 2026 02:10
@vers-one vers-one merged commit 9e53cd7 into master Mar 14, 2026
5 checks passed
@vers-one vers-one deleted the compressed-length branch March 14, 2026 02:27
@vers-one vers-one linked an issue Mar 15, 2026 that may be closed by this pull request
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.

Expose CompressedLength as well as Length on IZipFileEntry

1 participant