You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accept smaller reader interfaces in filesystem, extraction, and diff APIs #67
NewFS, ExtractAll, and diff.Compare require the full Reader interface, although their implementations only use List and Extract. This prevents using these consumers with Browser, which provides those operations without retaining all expanded file bodies.
To reproduce, construct a browser with OpenBrowser, then pass it to NewFS, ExtractAll, or diff.Compare. The call does not compile because Browser lacks the Hash and Close methods required by Reader.
Introduce a smaller interface for listing and extracting files, and use it where those are the only capabilities required. Existing Reader implementations should remain usable. The separate capability interfaces in mholt/archives illustrate the approach.
Account for browser lifecycle constraints before enabling this use: TAR-based inputs require reopening for later passes, and a browser requires each extracted file to be closed before the next operation. In particular, determine how NewFS should handle multiple open files. Document repeated TAR decompression costs; narrowing the interface alone does not remove them.
Add public API tests covering browser-backed filesystem reads, extraction, and diffs, including a reopening TAR source and existing buffered readers.
Source inspected: origin/main at dc26815591e2353cf40dc890953483664f882bdf. This is a library, so there is no git-pkgs --version output for it.
Activity