Skip to content

Instantly share code, notes, and snippets.

@acdimalev
Created September 19, 2021 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acdimalev/aae9c60c3592652eaeb08990ffc16867 to your computer and use it in GitHub Desktop.
Save acdimalev/aae9c60c3592652eaeb08990ffc16867 to your computer and use it in GitHub Desktop.
File Format
|-- 32 bits --|
+---------------+
| file magic | 0xa42d19a9
|---------------|
| record magic | see Record Magic
|---------------|
| total records | actual number of stored records
|---------------|
| next record | index at which next record should be stored
|---------------|
| label | 64-byte UTF-8 string
: :
| |
|---------------|
| record 0 | see Record Format
| |
|---------------|
| record 1 |
| |
|---------------|
: :
|---------------|
| record N |
| |
+---------------+
Record Format
|-- 32 bits --|
+---------------+
| timestamp | epoch time
|---------------|
| sample | see Record Magic and Sample Formats
+---------------+
Record Magic
|-- 16 bits --|-- 16 bits --|
+-------------------------------+
| sample format | sample units |
+-------------------------------+
Sample Formats
U24 (0xa5f1)
|-- 8 bits --|-- 24 bits --|
+---------------------------------------------------+
| exit code | unsigned integer |
+---------------------------------------------------+
Sample Units
microseconds (0x2fb5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment