diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-10-05 23:06:40 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-10-05 23:06:40 +0100 |
commit | 6c3d26705c4c3c671cce271f3645a302f01eaad8 (patch) | |
tree | deb83bc466d651fde04213fea3ea6aed77f19bb4 /docs | |
parent | b5ce01582154680b4d5064751afbf2dc5a47f42b (diff) |
docs: Document the Snappy format too.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/FORMAT.markdown | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/docs/FORMAT.markdown b/docs/FORMAT.markdown index 9c7aeff5..db493cc6 100644 --- a/docs/FORMAT.markdown +++ b/docs/FORMAT.markdown @@ -2,9 +2,31 @@ This document specifies the binary format of trace streams. -Trace streams are not written verbatim to file, but compressed, nowadays with -snappy (see `lib/trace/trace_file_snappy.cpp` for details). Previously they used -to be compressed with gzip. +## Compression ## + +Trace streams are not written verbatim to file, but compressed. + +By default traces are compressed with [Snappy](https://github.com/google/snappy) +(see below for details). Previously they used to be compressed with gzip. And +recently it also possible to have them compressed with +[Brotli](https://github.com/google/brotli), though this is mostly intended for +space savings on large databases of trace files. + +`apitrace repack` utility can be used to recompress the stream without any loss. + +### Snappy ### + +The used Snappy format is different from the standard _Snappy framing format_, +because it predates it. + + file = header chunk* + + header = 'a' 't' + + chunk = compressed_length compressed_data + + compressed_length = uint32 // length of compressed data in little endian + compressed_data = byte* ## Versions ## |