class BitStream::SubStreamPacket
Attributes
length[R]
Public Class Methods
instance(length)
click to toggle source
# File lib/bitstream.rb, line 118 def self.instance(length) new length end
new(length)
click to toggle source
# File lib/bitstream.rb, line 122 def initialize(length) if length % 8 != 0 raise NotImplementedError, "non-aligned substream has not been supported." end @length = length end
Public Instance Methods
read(s, offset)
click to toggle source
# File lib/bitstream.rb, line 131 def read(s, offset) if offset % 8 != 0 raise NotImplementedError, "non-aligned substream has not been supported." end return [LazyString.new(s, offset / 8, @length / 8), @length] end