Skip to content

Instantly share code, notes, and snippets.

@Wolfvak
Created December 24, 2019 20:31
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 Wolfvak/7bdfd8be4a08d0c168f69804f5a4f15b to your computer and use it in GitHub Desktop.
Save Wolfvak/7bdfd8be4a08d0c168f69804f5a4f15b to your computer and use it in GitHub Desktop.
BPM almost-documentation, scavenged off beat v03's source code
signature "BPM1"
number metadata_len
string metadata
actions {
// create directory with name `target_name`
action 0: CreatePath | ((name_len - 1) << 2) {
byte[] target_name
}
// create a file called `target_name` and fill it with `file_data`
action 1: CreateFile | ((name_len - 1) << 2) {
byte[] target_name
number file_length
byte[] file_data
uint32 checksum
}
// apply BPS patch against `target_name`
action 2: ModifyFile | ((name_len - 1) << 2) {
byte[] target_name
number origin
number bps_length
byte[] bps_file
}
// copy file `target_name` without modifications
action 3: MirrorFile | ((name_len - 1) << 2) {
byte[] target_name
number origin
uint32 checksum
}
}
uint32 checksum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment