Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop in replacement of brotli, how so? #92

Open
soloturn opened this issue Mar 13, 2023 · 1 comment
Open

drop in replacement of brotli, how so? #92

soloturn opened this issue Mar 13, 2023 · 1 comment

Comments

@soloturn
Copy link

soloturn commented Mar 13, 2023

on arch linux e.g. brotli consists of the following:

❯ paru -Ql brotli
brotli /usr/
brotli /usr/bin/
brotli /usr/bin/brotli
brotli /usr/include/
brotli /usr/include/brotli/
brotli /usr/include/brotli/decode.h
brotli /usr/include/brotli/encode.h
brotli /usr/include/brotli/port.h
brotli /usr/include/brotli/types.h
brotli /usr/lib/
brotli /usr/lib/libbrotlicommon-static.a
brotli /usr/lib/libbrotlicommon.so
brotli /usr/lib/libbrotlicommon.so.1
brotli /usr/lib/libbrotlicommon.so.1.0.9
brotli /usr/lib/libbrotlidec-static.a
brotli /usr/lib/libbrotlidec.so
brotli /usr/lib/libbrotlidec.so.1
brotli /usr/lib/libbrotlidec.so.1.0.9
brotli /usr/lib/libbrotlienc-static.a
brotli /usr/lib/libbrotlienc.so
brotli /usr/lib/libbrotlienc.so.1
brotli /usr/lib/libbrotlienc.so.1.0.9
brotli /usr/lib/pkgconfig/
brotli /usr/lib/pkgconfig/libbrotlicommon.pc
brotli /usr/lib/pkgconfig/libbrotlidec.pc
brotli /usr/lib/pkgconfig/libbrotlienc.pc

removing brotli is not possible as there are dependencies:

❯ paru -Rs brotli
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing brotli breaks dependency 'brotli' required by android-tools
:: removing brotli breaks dependency 'brotli' required by chromium
:: removing brotli breaks dependency 'brotli' required by curl
:: removing brotli breaks dependency 'libbrotlidec.so=1-64' required by curl
:: removing brotli breaks dependency 'brotli' required by freetype2
:: removing brotli breaks dependency 'brotli' required by gnutls
:: removing brotli breaks dependency 'brotli' required by libjxl
:: removing brotli breaks dependency 'brotli' required by libsoup
:: removing brotli breaks dependency 'libbrotlidec.so=1-64' required by libsoup
:: removing brotli breaks dependency 'brotli' required by libsoup3
:: removing brotli breaks dependency 'libbrotlidec.so=1-64' required by libsoup3
:: removing brotli breaks dependency 'brotli' required by nodejs
:: removing brotli breaks dependency 'brotli' required by qt6-base
:: removing brotli breaks dependency 'brotli' required by woff2

rust-brotli currently is the following, binary brotli renamed to brotlir at the moment to not clash with brotli:

❯ paru -Ql rust-brotli
rust-brotli /usr/
rust-brotli /usr/bin/
rust-brotli /usr/bin/brotlir
rust-brotli /usr/bin/catbrotli

what and how one would install rust-brotli to drop in instead of the shared libs as well? would it mean to link the rust-brotli so to all of the ones wanted?

./target/release/libbrotli_ffi.so
@danielrh
Copy link
Collaborator

danielrh commented Apr 3, 2024

I only tested with a very old version of brotli--it seems like the new brotli does export BrotliSetDictionaryData dictionary functions in libbrotlicommon that is not present in this version
If your lib only utilized the present functions then it would be a 1:1 drop-in that you could link against. I'm not sure the binaries can be substituted exactly this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants