summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/generated/bzip2.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
committerwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
commitf6a8facfd4bfc40025c069eebc37094d826aff58 (patch)
tree871aab0d8adafe736d954cae1783c260699c0ec3 /vendor/thecodingmachine/safe/generated/bzip2.php
parentcd2c10f9f71409df24fc74c1bbd7d5ddbf48d991 (diff)
Bump 'spomky-labs/otphp' to 11.3.x.
This is mainly for PHP 8.4 compatibility.
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/bzip2.php')
-rw-r--r--vendor/thecodingmachine/safe/generated/bzip2.php97
1 files changed, 0 insertions, 97 deletions
diff --git a/vendor/thecodingmachine/safe/generated/bzip2.php b/vendor/thecodingmachine/safe/generated/bzip2.php
deleted file mode 100644
index 8087c748a..000000000
--- a/vendor/thecodingmachine/safe/generated/bzip2.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\Bzip2Exception;
-
-/**
- * Closes the given bzip2 file pointer.
- *
- * @param resource $bz The file pointer. It must be valid and must point to a file
- * successfully opened by bzopen.
- * @throws Bzip2Exception
- *
- */
-function bzclose($bz): void
-{
- error_clear_last();
- $result = \bzclose($bz);
- if ($result === false) {
- throw Bzip2Exception::createFromPhpError();
- }
-}
-
-
-/**
- * This function is supposed to force a write of all buffered bzip2 data for the file pointer
- * bz,
- * but is implemented as null function in libbz2, and as such does nothing.
- *
- * @param resource $bz The file pointer. It must be valid and must point to a file
- * successfully opened by bzopen.
- * @throws Bzip2Exception
- *
- */
-function bzflush($bz): void
-{
- error_clear_last();
- $result = \bzflush($bz);
- if ($result === false) {
- throw Bzip2Exception::createFromPhpError();
- }
-}
-
-
-/**
- * bzread reads from the given bzip2 file pointer.
- *
- * Reading stops when length (uncompressed) bytes have
- * been read or EOF is reached, whichever comes first.
- *
- * @param resource $bz The file pointer. It must be valid and must point to a file
- * successfully opened by bzopen.
- * @param int $length If not specified, bzread will read 1024
- * (uncompressed) bytes at a time. A maximum of 8192
- * uncompressed bytes will be read at a time.
- * @return string Returns the uncompressed data.
- * @throws Bzip2Exception
- *
- */
-function bzread($bz, int $length = 1024): string
-{
- error_clear_last();
- $result = \bzread($bz, $length);
- if ($result === false) {
- throw Bzip2Exception::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * bzwrite writes a string into the given bzip2 file
- * stream.
- *
- * @param resource $bz The file pointer. It must be valid and must point to a file
- * successfully opened by bzopen.
- * @param string $data The written data.
- * @param int $length If supplied, writing will stop after length
- * (uncompressed) bytes have been written or the end of
- * data is reached, whichever comes first.
- * @return int Returns the number of bytes written.
- * @throws Bzip2Exception
- *
- */
-function bzwrite($bz, string $data, int $length = null): int
-{
- error_clear_last();
- if ($length !== null) {
- $result = \bzwrite($bz, $data, $length);
- } else {
- $result = \bzwrite($bz, $data);
- }
- if ($result === false) {
- throw Bzip2Exception::createFromPhpError();
- }
- return $result;
-}