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

Chunker Laravel Package

jstewmc/chunker

Multi-byte safe chunked reading for huge files or strings in PHP. Avoids breaking UTF-8 characters by adjusting chunk boundaries so each chunk is valid text, reducing memory use while processing streams sequentially.

View on GitHub
Deep Wiki
Context7
0.2.1

Added

  • Added tests to verify repeatability. That is, you can navigate to the end of the input, back to the beginning, back to the end, so on and so forth. Keep in mind, the chunks are only deterministic in one direction (i.e., the last chunk moving forward may not equal the first chunk moving backwards).

Changed

  • Updated navigation methods to be idempotent (i.e., calling next() at the end of the input multiple times does not change the current chunk or update the internal index).

Fixed

  • Fix README's examples and improved the language a little bit.
  • Fixed a bug where the chunker might return a string starting or ending with malformed byte sequences.
0.2.0

Version 0.2.0 includes a number of breaking changes, intended to make the library easier to use and maintain.

Removed

  • Removed the setIndex() method. It's better if you can't change a low-level component.
  • Removed the getName() and getText() methods. You already have that information and probably don't need the library to echo it back.

Changed

  • Updated the library for PHP 7.4+.
  • The $text and $name constructor arguments are now required for Text and File chunkers, respectively. You shouldn't be able to instantiate a chunker without either.
  • Added a $size argument to chunker constructors (i.e., removed setSize() and setEncoding() methods; added $size argument). Once a chunker has started chunking, changing the encoding or chunk size will break it. It seemed like a good idea to help prevent you from accidentally making a mistake.
  • Modernized the classes with property type hints, argument type hints, return type hints, guard clauses, etc.
  • Changed File tests from using concrete files and folders to using a virtual file system with bovigo/vfsStream.
  • Updated the README to better explain the problem this library solves.
  • Removed lots and lots of unnecessary comments :).

Added

0.1.0

The initial release.

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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity