Open
Description
This is really useful for debugging, especially when you're trying to implement serialization/deserialization logic.
Kaitai Struct is a tool that allows you to write declarative grammars for binary formats.
One of the tools it provides is a hex-based visualizer available in browser:
I wrote a grammar for the page format based on the description in the doc comments.
You can try it by visiting the ide.kaitai.io
link, pasting the below definition, and uploading a page file to the hex editor.
Hope other folks find this as useful as I have =)
msedge_DdHUpeoIFI.mp4
meta:
id: bustub_page
file-extension: db
endian: le
seq:
- id: header
type: page_header
- id: slots
type: tuple_slot
repeat: expr
repeat-expr: 'header.tuple_count'
- id: padding
type: u2
repeat: until
repeat-until: _ != 0
- id: tuples
type: tuple
repeat: eos
types:
page_header:
seq:
- id: page_id
type: u4
- id: log_storage_number
type: u4
- id: previous_page_id
type: u4
- id: next_page_id
type: u4
- id: free_space_pointer
type: u4
- id: tuple_count
type: u4
tuple_slot:
seq:
- id: offset
type: u4
- id: size
type: u4
tuple:
seq:
- id: len
type: u4
- id: data
size: len
Metadata
Metadata
Assignees
Labels
No labels