Module: FastImage::StreamUtil
- Included in:
- FiberStream, IOStream
- Defined in:
- lib/fastimage.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#read_byte ⇒ Object
370 371 372 |
# File 'lib/fastimage.rb', line 370 def read_byte read(1)[0].ord end |
#read_int ⇒ Object
374 375 376 |
# File 'lib/fastimage.rb', line 374 def read_int read(2).unpack('n')[0] end |
#read_string_int ⇒ Object
378 379 380 381 382 383 384 |
# File 'lib/fastimage.rb', line 378 def read_string_int value = [] while read(1) =~ /(\d)/ value << $1 end value.join.to_i end |