xref: /php-src/ext/bz2/bz2.stub.php (revision 577db994)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @param string|resource $file
7 * @return resource|false
8 */
9 function bzopen($file, string $mode) {}
10
11/** @param resource $bz */
12function bzread($bz, int $length = 1024): string|false {}
13
14/**
15 * @param resource $bz
16 * @implementation-alias fwrite
17 */
18function bzwrite($bz, string $data, ?int $length = null): int|false {}
19
20/**
21 * @param resource $bz
22 * @implementation-alias fflush
23 */
24function bzflush($bz): bool {}
25
26/**
27 * @param resource $bz
28 * @implementation-alias fclose
29 */
30function bzclose($bz): bool {}
31
32/** @param resource $bz */
33function bzerrno($bz): int {}
34
35/** @param resource $bz */
36function bzerrstr($bz): string {}
37
38/**
39 * @param resource $bz
40 * @return array<string, int|string>
41 * @refcount 1
42 */
43function bzerror($bz): array {}
44
45function bzcompress(string $data, int $block_size = 4, int $work_factor = 0): string|int {}
46
47function bzdecompress(string $data, bool $use_less_memory = false): string|int|false {}
48