Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Psl Laravel Package

azjezz/psl

PSL (PHP Standard Library) offers a consistent, well-typed set of safer, async-ready APIs to replace PHP primitives. Covers async, collections, networking, I/O, cryptography, terminal UI, and type-safe data validation with predictable errors.

View on GitHub
Deep Wiki
Context7

[# Compression

The Compression component provides streaming compression and decompression abstractions for IO handles. It defines compressor and decompressor interfaces, and four handle decorators that transparently compress or decompress data as it flows through.

This component is an abstraction layer -- it does not include any compression algorithms. Concrete implementations (e.g. deflate, gzip, brotli, zstd) are provided by separate packages that implement CompressorInterface and DecompressorInterface.

Interfaces

Two interfaces define the compression contract:

  • CompressorInterface -- push(string $data): string to incrementally compress, finish(): string to finalize and reset
  • DecompressorInterface -- push(string $data): string to incrementally decompress, finish(): string to finalize and reset

After finish(), the instance resets to initial state and can be reused for a new stream. Compression and decompression are inherently stateful -- a single instance must not be used concurrently across multiple fibers or streams.

Readers

CompressingReadHandle and DecompressingReadHandle wrap a readable handle and transform data on read. Both implement ReadHandleInterface. Wrap with IO\Reader for buffered methods like readLine() and readUntil().

Both accept an optional $chunkSize parameter (default 8192) controlling how many bytes are read from the inner handle per iteration. Increase it for large file compression, decrease it to reduce memory usage per stream.

@example('io/compression-reader.php')

Writers

CompressingWriteHandle and DecompressingWriteHandle wrap a writable handle and transform data on write. Both implement BufferedWriteHandleInterface. Call flush() to finalize the handle and write any remaining buffered data.

@example('io/compression-writer.php')

flush() accepts an optional CancellationTokenInterface parameter, so you can set a timeout on the finalization when writing to network handles.

See src/Psl/Compression/ for the full API.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle