mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
minor improve for compression dir (#5755)
This commit is contained in:
@ -1,12 +1,11 @@
|
||||
mod receipt_dictionary;
|
||||
mod transaction_dictionary;
|
||||
|
||||
pub use receipt_dictionary::RECEIPT_DICTIONARY;
|
||||
pub use transaction_dictionary::TRANSACTION_DICTIONARY;
|
||||
|
||||
use std::{cell::RefCell, thread_local};
|
||||
use zstd::bulk::{Compressor, Decompressor};
|
||||
|
||||
/// Compression/Decompression dictionary for `Receipt`.
|
||||
pub static RECEIPT_DICTIONARY: [u8; 100000] = include!("./receipt_dictionary.in");
|
||||
/// Compression/Decompression dictionary for `Transaction`.
|
||||
pub static TRANSACTION_DICTIONARY: [u8; 100000] = include!("./transaction_dictionary.in");
|
||||
|
||||
// Reason for using static compressors is that dictionaries can be quite big, and zstd-rs
|
||||
// recommends to use one context/compressor per thread. Thus the usage of `thread_local`.
|
||||
thread_local! {
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
/// Compression/Decompression dictionary for `Receipt`.
|
||||
pub static RECEIPT_DICTIONARY: [u8; 100000] = [
|
||||
[
|
||||
55, 164, 48, 236, 252, 66, 105, 97, 34, 16, 48, 92, 7, 241, 177, 245, 27, 152, 184, 38, 111, 9,
|
||||
213, 108, 137, 172, 90, 25, 120, 100, 212, 93, 89, 5, 57, 190, 223, 171, 242, 231, 222, 91,
|
||||
166, 131, 5, 32, 0, 6, 136, 193, 101, 2, 8, 76, 164, 28, 169, 7, 4, 128, 0, 131, 132, 3, 3,
|
||||
@ -3949,5 +3948,5 @@ pub static RECEIPT_DICTIONARY: [u8; 100000] = [
|
||||
0, 28, 2, 62, 56, 0, 0, 28, 2, 144, 64, 0, 0, 28, 2, 226, 72, 0, 0, 20, 82, 8, 0, 0, 20, 82, 8,
|
||||
0, 0, 20, 82, 8, 0, 0, 20, 164, 16, 0, 0, 20, 246, 24, 0, 0, 28, 1, 72, 32, 0, 0, 20, 82, 8, 0,
|
||||
0, 20, 164, 16, 0, 0, 20, 246, 24, 0, 0, 28, 1, 72, 32, 0, 0, 28, 1, 154, 40, 0, 0, 28, 1, 236,
|
||||
48, 0, 0, 28, 2, 62, 56, 0, 0, 28, 2,
|
||||
];
|
||||
48, 0, 0, 28, 2, 62, 56, 0, 0, 28, 2
|
||||
]
|
||||
@ -1,5 +1,4 @@
|
||||
/// Compression/Decompression dictionary for `Transaction`.
|
||||
pub static TRANSACTION_DICTIONARY: [u8; 100000] = [
|
||||
[
|
||||
55, 164, 48, 236, 228, 195, 180, 19, 23, 16, 24, 221, 1, 51, 63, 225, 72, 97, 70, 2, 203, 116,
|
||||
147, 152, 246, 253, 59, 253, 143, 14, 45, 83, 179, 4, 72, 0, 6, 133, 66, 193, 128, 56, 32, 20,
|
||||
160, 203, 245, 0, 4, 192, 64, 134, 7, 10, 20, 10, 5, 4, 10, 3, 130, 130, 4, 3, 130, 4, 17, 7,
|
||||
@ -4538,5 +4537,5 @@ pub static TRANSACTION_DICTIONARY: [u8; 100000] = [
|
||||
83, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 66,
|
||||
80, 85, 83, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
85, 83, 68, 74, 80, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 88, 65, 85, 85, 83, 68, 0, 0, 0,
|
||||
];
|
||||
0, 0, 88, 65, 85, 85, 83, 68, 0, 0, 0
|
||||
]
|
||||
Reference in New Issue
Block a user