Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Add a fs that reads converts achiveFS to a seekable version #342

@WeidiDeng

Description

@WeidiDeng

What would you like to have changed?

A similar implementation like tarfs or zipfs is appreciated.

Why is this feature a useful, necessary, and/or important addition to this project?

For performance and intuitivity. Current implementation of archiveFs is a glorified extract operation that tries to extract the file from the reader. Also due to the different arcive layout, some file may be at end the of archive. Every time a file is requested the process repeats which is bad for performance.

an FS.fs can be used in http.Filesystem, however because of archiveFs is implemented, file object can't be seeked, which means when golang http can't figure out content-type from file name or client requested range seek will fail, leading to error.

What alternatives are there, or what are you doing in the meantime to work around the lack of this feature?

In cloudreve, registering a mime type is all that's needed.

Please link to any relevant issues, pull requests, or other discussions.

Performance issues, seek error, cloudreve ttf can't be recognized without seeking on windows.

There is a hack for tar, but I doubt you are willing to do this for tar, rar or zip etc.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions