Method: PackfileReader::Hunk.new_without_type
- Defined in:
- lib/packfile_reader/packfile_hunk.rb
.new_without_type(packfile_io) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/packfile_reader/packfile_hunk.rb', line 29 def self.new_without_type(packfile_io) hunk_bytes = packfile_io.read(1).unpack('C')[0] continuation = hunk_bytes[7] # First representative bit of the byte size = (hunk_bytes & HUNK_SIZE_7_MASK) # We only have 7 bits in a hunk with type for size Hunk.new(continuation == 1, size, 7) end |