forgejo-aneksajo/modules/public
Gusted 4288c214a4 feat: improve generation of bundled assets (#8143)
- Replace the current vfsgen with our own bindata generator.
- zstd is used instead of gzip. This reduces the size of the resulting binary by 2MiB, the size of the bundled assets were thus reduced from 13MiB to 11MiB.
- If [the browser accepts zstd encoding](https://caniuse.com/zstd), then the compressed bytes can be served directly, otherwise it falls back to being compressed by gzip if it's not disabled via `[server].ENABLE_GZIP`
- The compression and decompression speed is roughly 4 times faster.
- The generated filesystem is now of type `fs.Fs` instead of `http.FileSystem`, this slightly simplifies the generated code and
handling of the assets.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8143
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-06-11 09:36:18 +02:00
..
mime_types.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
public.go feat: improve generation of bundled assets (#8143) 2025-06-11 09:36:18 +02:00
public_bindata.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
public_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
serve_dynamic.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
serve_static.go feat: improve generation of bundled assets (#8143) 2025-06-11 09:36:18 +02:00