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])
| 310 | /// [`DEFAULT_MAX_DECOMPRESSED`]. Use [`decode_with_limit`] to set a tighter cap |
| 311 | /// for untrusted input. |
| 312 | pub fn decode<T: DeserializeOwned>(bytes: &[u8]) -> Result<T, SyncError> { |
| 313 | decode_with_limit(bytes, DEFAULT_MAX_DECOMPRESSED) |
| 314 | } |
| 315 | |
| 316 | /// Decompress and deserialize a wire body, refusing to inflate past `max_len` |
| 317 | /// bytes. The bound is enforced during decompression (streaming), so a zip bomb |