Module: FastImage::StreamUtil
- Included in:
- FiberStream, IOStream
- Defined in:
- lib/fastimage.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#read_byte ⇒ Object
395 396 397 |
# File 'lib/fastimage.rb', line 395 def read_byte read(1)[0].ord end |
#read_int ⇒ Object
399 400 401 |
# File 'lib/fastimage.rb', line 399 def read_int read(2).unpack('n')[0] end |
#read_string_int ⇒ Object
403 404 405 406 407 408 409 |
# File 'lib/fastimage.rb', line 403 def read_string_int value = [] while read(1) =~ /(\d)/ value << $1 end value.join.to_i end |