Skip to content

Instantly share code, notes, and snippets.

@mcandre
Created September 12, 2020 15:46
Show Gist options
  • Save mcandre/f268ad2bd1fbc69548e57e988033d88e to your computer and use it in GitHub Desktop.
Save mcandre/f268ad2bd1fbc69548e57e988033d88e to your computer and use it in GitHub Desktop.
bit manip
#!/usr/bin/env ruby
file = File.new('/tmp/default.pcm.dat', 'rb')
while bytes = file.read(4) do
puts bytes.unpack('l>')[0]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment