=head1 NAME

Data::MessagePack::Unpacker - messagepack streaming deserializer

=head1 SYNOPSIS

    use Data::Dumper;
    my $up = Data::MessagePack::Unpacker->new;
    my $ret = $up->execute($v, 0);
    if ($ret != length($v)) {
        fail "extra bytes";
    }
    return Dumper($up->data);

=head1 DESCRIPTION

This is a streaming deserializer for messagepack.

=head1 METHODS

=over 4

=item my $up = Data::MessagePack::Unpacker->new()

creates a new instance of stream deserializer.

=item $up->utf8([$bool])

sets utf8 mode. true if I<$bool> is omitted.
returns I<$up> itself.

If utf8 mode is enabled, strings will be decoded as UTF-8.

The utf8 mode is disabled by default.

=item my $ret = $up->get_utf8()

returns the utf8 mode flag of I<$up>.

=item my $ret = $up->execute($data, $offset);

=item my $ret = $up->execute_limit($data, $offset, $limit)

    $up->execute(substr($data, 0, 3), 0);
    $up->execute($data,               3);

$offset is the offset of $data.

=item my $bool = $up->is_finished();

is this deserializer finished?

=item my $data = $up->data();

returns the deserialized object.

=item $up->reset();

resets the stream deserializer, without memory zone.

=back

=head1 AUTHORS

Tokuhiro Matsuno

=head1 SEE ALSO

L<Data::MessagePack>

