Skip to content

Instantly share code, notes, and snippets.

@jimweirich
Created March 6, 2013 00:26
Show Gist options
  • Save jimweirich/5095692 to your computer and use it in GitHub Desktop.
Save jimweirich/5095692 to your computer and use it in GitHub Desktop.
Sample of parsing large binary buffer one variable length section at a time.
loop do
section = parse_section_from_binary_buffer(data)
break if section.nil?
data = data[section.size .. -1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment