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
❯ gocloc brotli
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Go 61 2451 1941 252967
Plain Text 1 815 0 8471
Markdown 1 1 0 4
-------------------------------------------------------------------------------
TOTAL 63 3267 1941 261442
-------------------------------------------------------------------------------
Almost none of that are tests, so all of that code is getting compiled in. In my testing adding this package increases my binary size by about 5.5mb. In comparison, github.com/klauspost/compress/zstd is 10 thousand lines of code with tests, and only adds about 700kb to the binary.
This package uses https://github.com/andybalholm/brotli to handle the actual compression. This package has 260 thousand lines of code:
Almost none of that are tests, so all of that code is getting compiled in. In my testing adding this package increases my binary size by about 5.5mb. In comparison, github.com/klauspost/compress/zstd is 10 thousand lines of code with tests, and only adds about 700kb to the binary.
I'm afraid that the increase in binary size due to https://github.com/andybalholm/brotli offsets the gains made by better compression.
The text was updated successfully, but these errors were encountered: