Add stream context metadata options for compress.zlib:// protocol wrapper so that original mtime and name can be given
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 40.4k
- Forks
- 8.1k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 96
Beschreibung
Description
Currently, when writing to a gz file using the compress.zlib:// protocol wrapper it is not possible to pass the mtime or name of the original file. It would be nice if we could do so without having to reopen the gzip file in write mode for write the metadata directly into it as in this bug report https://bugs.php.net/bug.php?id=46577
I believe that this can be done by adding new stream context options for zlib (similar to those for phar). See https://www.php.net/manual/en/context.php
The gzip file format supports the following meta data:
- compression method
- itype (text or binary)
- mtime (nice to have)
- size (thankfully set by compress.zlib:// )
- os
- original file name (nice to have)
- comment
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Untersuchung des Protokoll-Wrappers compress.zlib:// und seiner Verarbeitung der Stream-Kontextoptionen. Vergleiche anschließend die im Issue referenzierten bestehenden phar-Kontextoptionen. Ermittle, wie mtime und der ursprüngliche Dateiname in die gzip-Metadaten übergeben werden sollen, und überprüfe, dass das Schreiben über den Wrapper beide Werte beibehält, ohne die Datei erneut zu öffnen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, php
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100