Module: FastImage::StreamUtil
- Included in:
- FiberStream, IOStream
- Defined in:
- lib/fastimage.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#read_byte ⇒ Object
232 233 234 |
# File 'lib/fastimage.rb', line 232 def read_byte read(1)[0].ord end |
#read_int ⇒ Object
236 237 238 |
# File 'lib/fastimage.rb', line 236 def read_int read(2).unpack('n')[0] end |
#read_string_int ⇒ Object
240 241 242 243 244 245 246 |
# File 'lib/fastimage.rb', line 240 def read_string_int value = [] while read(1) =~ /(\d)/ value << $1 end value.join.to_i end |