# $self->{_buffer} is chunk of the binary file sub readString16 { my($self) = @_; my $len = unpack('S*',substr($self->{_buffer},0,2,"")); return substr($self->{_buffer},0,$len,""); }