[php-src] master: ext/phar: remove PHAR_HDR_COMPRESSION* flags as they are unused (#22504)

Gina Peter Banyard via GitHub <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-06-28T21:35:14+01:00

Commit: https://github.com/php/php-src/commit/eaa63259597a46198a4f78d27d55512d043b7ef5
Raw diff: https://github.com/php/php-src/commit/eaa63259597a46198a4f78d27d55512d043b7ef5.diff

ext/phar: remove PHAR_HDR_COMPRESSION* flags as they are unused (#22504)

Changed paths:
  M  ext/phar/phar.c
  M  ext/phar/phar_internal.h


Diff:

diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index c64c448c52a5..9f0ccc627279 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -831,7 +831,6 @@ static zend_result phar_parse_pharfile(php_stream *fp, const char *fname, size_t
 
 	SAFE_PHAR_GET_32(buffer, endbuffer, manifest_flags);
 
-	manifest_flags &= ~PHAR_HDR_COMPRESSION_MASK;
 	manifest_flags &= ~PHAR_FILE_COMPRESSION_MASK;
 	/* remember whether this entire phar was compressed with gz/bzip2 */
 	manifest_flags |= compression;
diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h
index a7a5581e1606..30d863b02f09 100644
--- a/ext/phar/phar_internal.h
+++ b/ext/phar/phar_internal.h
@@ -38,10 +38,6 @@
 #define PHAR_API_MAJORVER_MASK    0xF000
 #define PHAR_API_VER_MASK         0xFFF0
 
-#define PHAR_HDR_COMPRESSION_MASK 0x0000F000
-#define PHAR_HDR_COMPRESSED_NONE  0x00000000
-#define PHAR_HDR_COMPRESSED_GZ    0x00001000
-#define PHAR_HDR_COMPRESSED_BZ2   0x00002000
 #define PHAR_HDR_SIGNATURE        0x00010000
 
 /* flags for defining that the entire file should be compressed */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.