Skip to content

Instantly share code, notes, and snippets.

@felixr
Created Nov 27, 2020
Embed
What would you like to do?
reMarkable lines format (v3 and v5)
meta:
id: remarkable_lines
file-extension: rm
endian: le
seq:
- id: header
type: header
- id: page
type: page
enums:
version:
0x33: v3
0x35: v5
pen_type:
0x06: eraser
0x08: eraser_area
0x10: marker
0x11: fineliner
0x0C: paintbrush
0x0D: mechanical_pencil
0x0E: pencil
0x0F: ballpoint
0x12: highlighter
0x15: calligraphy
color:
0: black
1: grey
2: white
types:
header:
seq:
- id: magic
contents: 'reMarkable .lines file, version='
- id: version_tag
type: u1
enum: version
- id: spaces
contents: ' '
page:
seq:
- id: num_layers
type: s4
- id: layers
type: layer
repeat: expr
repeat-expr: num_layers
layer:
seq:
- id: num_lines
type: s4
- id: lines
type: line
repeat: expr
repeat-expr: num_lines
line:
seq:
- id: pen
type: s4
enum: pen_type
- id: color
type: s4
enum: color
- id: unknown1
type: s4
- id: brush_size
type: f4
- id: unknown2
type: f4
if: _root.header.version_tag == version::v5
- id: num_points
type: s4
- id: points
type: point
repeat: expr
repeat-expr: num_points
point:
seq:
- id: x
type: f4
- id: y
type: f4
- id: speed
type: f4
- id: direction
type: f4
- id: width
type: f4
- id: pressure
type: f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment