mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
Add binmode() for stream unpacking
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user