inflate_get_read_len
Description
The inflate_get_read_len of zlib for PHP gets the number of bytes read so far.
Syntax
inflate_get_read_len( InflateContext $context ): int
Parameters
context
A context created with inflate_init().
Return
Returns number of bytes read so far or false on failure.
Examples
1 · context
<? $encoding = ZLIB_ENCODING_DEFLATE; $context = inflate_init($encoding); $return = inflate_get_read_len($context); echo $return; ?>
0
2 · inflate_add
<? $encoding = ZLIB_ENCODING_DEFLATE; $deflate_initcontext = deflate_init($encoding); $deflate_initdata = "data"; $context = inflate_init($encoding); $data = deflate_add($deflate_initcontext, $deflate_initdata); inflate_add($context, $data); $return = inflate_get_read_len($context); echo $return; ?>
12