NAME

Archive::CAR::Utils - Low-level utilities for CAR archives

SYNOPSIS

use Archive::CAR::Utils qw(encode_varint decode_varint decode_cid);

# Internal binary manipulation

DESCRIPTION

Archive::CAR::Utils provides internal helper functions for varint encoding/decoding and CID retrieval from binary streams.

FUNCTIONS

encode_varint($value)

Encodes an integer into an unsigned varint (LEB128).

decode_varint($fh_or_scalar)

Decodes an unsigned varint from a filehandle or scalar string.

decode_cid($fh)

Wrapper around "decode" in Archive::CAR::CID.

systell($fh)

Returns the current byte position in the given filehandle using standard buffered tell(). Despite the name, this no longer uses sysseek for improved compatibility.

SEE ALSO

Archive::CAR

AUTHOR

Sanko Robinson <sanko@cpan.org>

COPYRIGHT

Copyright (C) 2026 by Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.