[llvm] [LLVM] Add zstd and zlib compressed frame magic to LLVM magic (PR #222773)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 01:11:03 PDT 2026


jh7370 wrote:

> @jh7370 do you find the new approach satisfactory? As above, `zlib` does not provide a specific 'magic' value but we can key off of the header options LLVM generates. I only checked the headers that `llvm::compress` yields as the full search space is relatively large and shared bytes with other magic values.

Sorry for the slow response: I have a lot on my plate at the moment. If zlib doesn't provide a distinct magic sequence unlike zstd, I'd be concerned that recognising only a subset could give a misleading impression, especially as we don't need to do that. More importantly though, this doesn't really address the other half of my comment saying that for your use-case, using `identify_magic` feels like the wrong approach, because you're not dealing with arbitrary objects and you know that the data is compressed already.

https://github.com/llvm/llvm-project/pull/222773


More information about the llvm-commits mailing list