Decompress and deserialize a wire body, bounded by [`DEFAULT_MAX_DECOMPRESSED`]. Use [`decode_with_limit`] to set a tighter cap for untrusted input.
(bytes: &[u8])
| 304 | /// [`DEFAULT_MAX_DECOMPRESSED`]. Use [`decode_with_limit`] to set a tighter cap |
| 305 | /// for untrusted input. |
| 306 | pub fn decode<T: DeserializeOwned>(bytes: &[u8]) -> Result<T, SyncError> { |
| 307 | decode_with_limit(bytes, DEFAULT_MAX_DECOMPRESSED) |
| 308 | } |
| 309 | |
| 310 | /// Decompress and deserialize a wire body, refusing to inflate past `max_len` |
| 311 | /// bytes. The bound is enforced during decompression (streaming), so a zip bomb |