class BinData::IO::Read

def transform(io)

yields +self+ and +io+ to the given block

+io+ must be an instance of +Transform+.

See +BinData::Buffer+ as an example.
Allow transforming data in the input stream.
def transform(io)
  reset_read_bits
  saved = @io
  @io = io.prepend_to_chain(@io)
  yield(self, io)
  io.after_read_transform
ensure
  @io = saved
end