%i(string str)
26 27 28 29
# File 'lib/zero_formatter/serializer/string.rb', line 26 def deserialize(bytes, offset=0) len = Utils.read_s4(bytes, offset) bytes.byteslice(offset+4, len) end
20 21 22 23 24
# File 'lib/zero_formatter/serializer/string.rb', line 20 def serialize(value) value ||= "" Utils.write_s4(value.bytesize) << value end