6.50. kink/io/BIN_INPUT¶
Provides `input` implementation which extracts bytes from `bin`.
6.50.1. BIN_INPUT.new(Bin)¶
`new` returns an `input` which extracts bytes from `Bin`.
Closing the `input` returned by `new` does nothing.
Precondition
`Bin` must be a `bin`.
Example
:BIN.require_from('kink/')
:BIN_INPUT.require_from('kink/io/')
:In <- BIN_INPUT.new(BIN.of(1 2 3 4 5 6))
stdout.print_line(In.read(3).repr) # => (bin 0x01 0x02 0x03)
stdout.print_line(In.read_all.repr) # => (bin 0x04 0x05 0x06)