Skip to main content

decode_events

Function decode_events 

Source
pub fn decode_events(
    data: &[u8],
) -> Result<(CacheHeader, Vec<Event>), CacheError>
Expand description

Decode binary cache bytes back to a vector of events.

Convenience wrapper around CacheHeader::decode + CacheColumns::into_events.

Note: The event_hash field of each reconstructed event will be empty. Callers that need hashes must recompute them from the TSJSON writer.

ยงErrors

Returns CacheError if header validation, CRC check, or column decode fails.