Skip to content

IO/ICompression - Standardized interface for compression and decompression of data - #1239

Open
belisoful wants to merge 4 commits into
pradosoft:masterfrom
belisoful:io-icompressor
Open

IO/ICompression - Standardized interface for compression and decompression of data#1239
belisoful wants to merge 4 commits into
pradosoft:masterfrom
belisoful:io-icompressor

Conversation

@belisoful

Copy link
Copy Markdown
Member

Implementing it lets a caller select a compression codec without binding to one algorithm.

@belisoful
belisoful marked this pull request as ready for review August 13, 2026 05:56
@belisoful
belisoful marked this pull request as draft August 13, 2026 06:22
@belisoful
belisoful marked this pull request as ready for review August 13, 2026 07:07
@belisoful
belisoful marked this pull request as draft August 13, 2026 07:08
@belisoful

belisoful commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

There is a question here on what to do:
I'd like to break out the prado-io into its own repo as it completes. Should the Compressors be part of the IO repo or should they have their own separate repo, like prado-compressors?

If the compressors are part of io, then they should be included here for the move.
otherwise compressors should be their own repo.
(My preference is a ever so slightly towards separate repo)

Another question: Should we have an XZ Compressor as a stub for a future possible PHP repo for it? (My preference is yes, because of the next question)
And lastly, should the PRADO classes for the built in compressors also attempt to use the command line versions? (3rd party can supply cli compressor support, [I was considering filling this gap])

PRADO is the layer for and on top of PHP, not OS cli dependent.

@ctrlaltca

Copy link
Copy Markdown
Member

The "modern way" is to try to split everything up in a lot of small, more manageable repos and including them.
PRADO has always been the exact opposite of this, including everything in a single monolithic framework.
But i agree some parts of the framework cloud be split and moved to a separate repo, eg.:

  • really specific components, eg. some of the IO classes you are creating in the last period
  • the whole Data / PDO and scaffolding components
  • components requiring external dependencies
  • components we are phasing out but still support (eg. the old pradosoft/prado-tinymce3)

The final decision for the IO/compressor repo is up to you.
About using cli commands, i'm not really a fa of this approach, but if it's the only way to implement something i see no better option.

@belisoful

Copy link
Copy Markdown
Member Author

I am just a little torn between the old monolithic way and modern "split everything" way. I want to go with the trends. That may be a PRADO 5 thing, to break up prado into smaller chunks.

OK. The Compressor classes go in IO. I'm going to include an XZ stub for the future. They will only be based on PHP and PHP extensions. This is a similar seam split as Prado Data, only supporting what is in PHP. I'll do my own repo that supports the cli version. It will fit well as a Fallback for the standard PHP compressors, though XZ is CLI only at this point.

…r, TZlibCompressor, TDeflateCompressor, TBzip2Compressor, TZstdCompressor, TBrotliCompressor), TCompression negotiation facade, TCliCompressor/TCliCompressorTrait CLI backend, TXzCompressor stub - unit tests, classes.php, messages.txt
@belisoful
belisoful marked this pull request as ready for review August 14, 2026 07:15
@belisoful belisoful changed the title IO/ICompressor - Standardized interface for compression and decompression of data IO/ICompression - Standardized interface for compression and decompression of data Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants