fn encode_canonical( max_buckets: u32, initial_error: f64, compactions: u8, count: u64, sum: f64, buckets: &[(LegacyBucketKey, u64)], ) -> Result<Vec<u8>, String>