Skip to content

Instantly share code, notes, and snippets.

View booty's full-sized avatar

John Booty booty

  • Upstart
  • Near Philadelphia, PA
  • 03:02 (UTC -04:00)
View GitHub Profile
@copiousfreetime
copiousfreetime / yajl-gzip-stream-parse.rb
Created January 18, 2019 23:00
Using Yajl to stream parse a gzipped file
#!/usr/bin/env ruby
require 'yajl'
require 'zlib'
require 'hitimes'
metric = ::Hitimes::TimedValueMetric.new('yajl')
infile = ARGV.shift
count = 0
buffer_size = 1024 * 64