Skip to content

Provide access to ZIP archive entry in EpubLocalContentFileRef class#147

Merged
vers-one merged 2 commits intomasterfrom
content-file-entry
Mar 15, 2026
Merged

Provide access to ZIP archive entry in EpubLocalContentFileRef class#147
vers-one merged 2 commits intomasterfrom
content-file-entry

Conversation

@vers-one
Copy link
Copy Markdown
Owner

Provide access to ZIP archive entry in EpubLocalContentFileRef class

This is:

  • a bug fix
  • an enhancement

Related issue: #144

Description

This pull request adds the ContentFileEntry property to the EpubLocalContentFileRef class. This property provides access to the underlying ZIP archive entry that corresponds to the content file.

Testing steps

Use the following code to test the new property:

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

@vers-one vers-one self-assigned this Mar 14, 2026
@vers-one vers-one merged commit b2b3239 into master Mar 15, 2026
5 checks passed
@vers-one vers-one deleted the content-file-entry branch March 15, 2026 00:45
@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