FILE5_47-17-g50fc7a6b.pr-166-flanglet-add-kanzi-magic.patch 1.0 KB

1234567891011121314151617181920212223242526
  1. Subject: PR/166: flanglet: Add Kanzi magic
  2. Origin: upstream, commit FILE5_47-17-g50fc7a6b <https://github.com/file/file/commit/FILE5_47-17-g50fc7a6b>
  3. Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Sun Apr 12 21:14:24 2026 +0000
  5. Forwarded: not-needed
  6. --- a/magic/Magdir/compress
  7. +++ b/magic/Magdir/compress
  8. @@ -465,3 +465,17 @@
  9. # https://github.com/xamarin/xamarin-android/pull/4686
  10. 0 string XALZ Xamarin LZ4-compressed assembly
  11. >8 ulelong x \b, uncompressed size %u
  12. +
  13. +#------------------------------------------------------------------------------
  14. +# Kanzi: Kanzi compressed data
  15. +# From: Frederic Langlet <flanglet@gmail.com>
  16. +# https://github.com/flanglet/kanzi-cpp/wiki/Bitstream-Format
  17. +0 belong 0x4B414E5A kanzi compressed data
  18. +!:mime application/x-knz
  19. +!:ext knz
  20. +>4 byte/16 x \b, version %u
  21. +
  22. +# Branch for Version > 5 (Uses Bits 3 and 2 for checksum)
  23. +>4 byte/16 >5
  24. +>>4 byte&0x0C 0x04 \b, 32-bit checksum
  25. +>>4 byte&0x0C 0x08 \b, 64-bit checksum