Static embed files should not be decompress and compress #3414

Closed
opened 2025-11-02 05:12:13 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @lunny on GitHub (Jun 3, 2019).

As I said on https://github.com/go-gitea/gitea/pull/7080#issuecomment-498038665 , currently we use http.FileSystem to open a embed file on memory, that will decompress from a gzip compressed memory file and then we serve it as a http request and compress it(maybe). So I think that we can provide the gzip compressed file directly.

From vfsgen, we could detect if the File is httpgzip.NotWorthGzipCompressing or httpgzip.GzipByter to do that.

Originally created by @lunny on GitHub (Jun 3, 2019). As I said on https://github.com/go-gitea/gitea/pull/7080#issuecomment-498038665 , currently we use `http.FileSystem` to open a embed file on memory, that will decompress from a gzip compressed memory file and then we serve it as a http request and compress it(maybe). So I think that we can provide the gzip compressed file directly. From vfsgen, we could detect if the `File` is `httpgzip.NotWorthGzipCompressing` or `httpgzip.GzipByter` to do that.
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 05:12:13 -06:00
Author
Owner

@stale[bot] commented on GitHub (Aug 2, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 2, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3414