Files

Class/Module Index [+]

Quicksearch

BinData::CountBytesRemaining

Counts the number of bytes remaining in the input stream from the current position to the end of the stream. This only makes sense for seekable streams.

require 'bindata'

class A < BinData::Record
  count_bytes_remaining :bytes_remaining
  string :all_data, :read_length => :bytes_remaining
end

obj = A.read("abcdefghij")
obj.all_data #=> "abcdefghij"

[Validate]

Generated with the Darkfish Rdoc Generator 2.