mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
Add binmode() for stream unpacking
This commit is contained in:
parent
afbddbfcda
commit
7c1e0ea95d
1 changed files with 1 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ is_deeply(Data::MessagePack->unpack($packed), $input);
|
|||
|
||||
note "packed size: ", length($packed);
|
||||
open my $stream, '<:bytes :scalar', \$packed;
|
||||
binmode $stream;
|
||||
my $buff;
|
||||
while( read($stream, $buff, $size) ) {
|
||||
note "buff: ", join " ", map { unpack 'H2', $_ } split //, $buff;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue