mirror of
https://github.com/google/brotli.git
synced 2026-09-22 06:35:52 +00:00
brotli compression c# and JS #444
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sasankjonna on GitHub (Jan 10, 2023).
I am using below code to compress using C#
var bytes = Encoding.UTF8.GetBytes(value);
await using var input = new MemoryStream(bytes);
await using var output = new MemoryStream();
await using var stream = new BrotliStream(output, level);
and the below code to compress using JS
zlib.brotliCompress(JSON.stringify(json), {
level : 0,
params: {
[zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT
}
}
The outputs of these two compressions doesnt match. What needs to be tweaked t make them match?
@eustas commented on GitHub (Jun 20, 2023):
What are the libraries / versions you use in C# and JS?
@eustas commented on GitHub (Jul 10, 2023):
Feel free to reopen