mirror of
https://github.com/nushell/nushell
synced 2024-12-28 05:53:09 +00:00
28e33587d9
# Description Increase default compression level for brotli on msgpackz to 3. This has the best compression time generally. Level 0 and 1 give weird results and sometimes cause extremely inflated outputs rather than being compressed. So far this hasn't really been a problem for the plugin registry file, but has been for other data. The `$example` is the web-app example from https://json.org/example.html Benchmarked with: ```nushell seq 0 11 | each { |level| let compressed = ($example | to msgpackz --quality $level) let time = (timeit { $example | to msgpackz --quality $level }) { level: $level time: $time length: ($compressed | bytes length) ratio: (($uncompressed_length | into float) / ($compressed | bytes length)) } } ``` ``` ╭────┬───────┬─────────────────┬────────┬───────╮ │ # │ level │ time │ length │ ratio │ ├────┼───────┼─────────────────┼────────┼───────┤ │ 0 │ 0 │ 4ms 611µs 875ns │ 3333 │ 0.72 │ │ 1 │ 1 │ 1ms 334µs 500ns │ 3333 │ 0.72 │ │ 2 │ 2 │ 190µs 333ns │ 1185 │ 2.02 │ │ 3 │ 3 │ 184µs 42ns │ 1128 │ 2.12 │ │ 4 │ 4 │ 245µs 83ns │ 1098 │ 2.18 │ │ 5 │ 5 │ 265µs 584ns │ 1040 │ 2.30 │ │ 6 │ 6 │ 270µs 792ns │ 1040 │ 2.30 │ │ 7 │ 7 │ 444µs 708ns │ 1040 │ 2.30 │ │ 8 │ 8 │ 1ms 801µs │ 1040 │ 2.30 │ │ 9 │ 9 │ 843µs 875ns │ 1037 │ 2.31 │ │ 10 │ 10 │ 4ms 128µs 375ns │ 984 │ 2.43 │ │ 11 │ 11 │ 6ms 352µs 834ns │ 986 │ 2.43 │ ╰────┴───────┴─────────────────┴────────┴───────╯ ``` cc @maxim-uvarov |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE | ||
README.md |
nu-protocol
The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.