let input_int32 chn endian =
let (a0,a1,a2,a3) =
(
input_byte chn,
input_byte chn,
input_byte chn,
input_byte chn
)
in
match endian with
BigEndian ->
int32_of_byte (a0,a1,a2,a3)
| LittleEndian ->
int32_of_byte (a3,a2,a1,a0)