ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16] require 'msgpack' require 'benchmark' require 'json' # https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/parser_ltsv.rb class LTSV def self.parse(text) r = {} text.split("\t").each do |pair| key, value = pair.split(":", 2) r[key] = value end r end def self.generate(data) data.map {|k,v| k+":"+v }.join("\t") end end src = Ha