polyfile-weave 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of polyfile-weave might be problematic. Click here for more details.

Files changed (585) hide show
  1. polyfile/__init__.py +15 -0
  2. polyfile/__main__.py +394 -0
  3. polyfile/arithmetic.py +27 -0
  4. polyfile/ast.py +114 -0
  5. polyfile/debugger.py +1039 -0
  6. polyfile/expressions.py +346 -0
  7. polyfile/fileutils.py +343 -0
  8. polyfile/html.py +135 -0
  9. polyfile/http/__init__.py +1 -0
  10. polyfile/http/defacto.py +37 -0
  11. polyfile/http/deprecated.py +51 -0
  12. polyfile/http/experimental.py +67 -0
  13. polyfile/http/http_11.py +548 -0
  14. polyfile/http/matcher.py +37 -0
  15. polyfile/http/structured_headers.py +48 -0
  16. polyfile/iterators.py +72 -0
  17. polyfile/jpeg.py +24 -0
  18. polyfile/kaitai/__init__.py +0 -0
  19. polyfile/kaitai/compiler.py +156 -0
  20. polyfile/kaitai/parser.py +312 -0
  21. polyfile/kaitai/parsers/__init__.py +0 -0
  22. polyfile/kaitai/parsers/aix_utmp.py +116 -0
  23. polyfile/kaitai/parsers/allegro_dat.py +367 -0
  24. polyfile/kaitai/parsers/andes_firmware.py +64 -0
  25. polyfile/kaitai/parsers/android_bootldr_asus.py +105 -0
  26. polyfile/kaitai/parsers/android_bootldr_huawei.py +181 -0
  27. polyfile/kaitai/parsers/android_bootldr_qcom.py +217 -0
  28. polyfile/kaitai/parsers/android_dto.py +138 -0
  29. polyfile/kaitai/parsers/android_img.py +319 -0
  30. polyfile/kaitai/parsers/android_nanoapp_header.py +83 -0
  31. polyfile/kaitai/parsers/android_opengl_shaders_cache.py +151 -0
  32. polyfile/kaitai/parsers/android_sparse.py +237 -0
  33. polyfile/kaitai/parsers/android_super.py +401 -0
  34. polyfile/kaitai/parsers/apm_partition_table.py +196 -0
  35. polyfile/kaitai/parsers/apple_single_double.py +180 -0
  36. polyfile/kaitai/parsers/asn1_der.py +235 -0
  37. polyfile/kaitai/parsers/au.py +138 -0
  38. polyfile/kaitai/parsers/avantes_roh60.py +112 -0
  39. polyfile/kaitai/parsers/avi.py +296 -0
  40. polyfile/kaitai/parsers/bcd.py +111 -0
  41. polyfile/kaitai/parsers/bitcoin_transaction.py +210 -0
  42. polyfile/kaitai/parsers/blender_blend.py +334 -0
  43. polyfile/kaitai/parsers/bmp.py +780 -0
  44. polyfile/kaitai/parsers/bson.py +411 -0
  45. polyfile/kaitai/parsers/btrfs_stream.py +318 -0
  46. polyfile/kaitai/parsers/bytes_with_io.py +27 -0
  47. polyfile/kaitai/parsers/chrome_pak.py +194 -0
  48. polyfile/kaitai/parsers/code_6502.py +456 -0
  49. polyfile/kaitai/parsers/compressed_resource.py +217 -0
  50. polyfile/kaitai/parsers/cpio_old_le.py +154 -0
  51. polyfile/kaitai/parsers/cramfs.py +344 -0
  52. polyfile/kaitai/parsers/creative_voice_file.py +342 -0
  53. polyfile/kaitai/parsers/dbf.py +274 -0
  54. polyfile/kaitai/parsers/dcmp_0.py +664 -0
  55. polyfile/kaitai/parsers/dcmp_1.py +422 -0
  56. polyfile/kaitai/parsers/dcmp_2.py +312 -0
  57. polyfile/kaitai/parsers/dcmp_variable_length_integer.py +66 -0
  58. polyfile/kaitai/parsers/dex.py +1086 -0
  59. polyfile/kaitai/parsers/dicom.py +4370 -0
  60. polyfile/kaitai/parsers/dime_message.py +201 -0
  61. polyfile/kaitai/parsers/dns_packet.py +569 -0
  62. polyfile/kaitai/parsers/doom_wad.py +654 -0
  63. polyfile/kaitai/parsers/dos_datetime.py +191 -0
  64. polyfile/kaitai/parsers/dos_mz.py +172 -0
  65. polyfile/kaitai/parsers/ds_store.py +513 -0
  66. polyfile/kaitai/parsers/dtb.py +310 -0
  67. polyfile/kaitai/parsers/dune_2_pak.py +126 -0
  68. polyfile/kaitai/parsers/edid.py +472 -0
  69. polyfile/kaitai/parsers/efivar_signature_list.py +331 -0
  70. polyfile/kaitai/parsers/elf.py +2482 -0
  71. polyfile/kaitai/parsers/ethernet_frame.py +114 -0
  72. polyfile/kaitai/parsers/exif.py +723 -0
  73. polyfile/kaitai/parsers/ext2.py +537 -0
  74. polyfile/kaitai/parsers/fallout2_dat.py +187 -0
  75. polyfile/kaitai/parsers/fallout_dat.py +156 -0
  76. polyfile/kaitai/parsers/fasttracker_xm_module.py +558 -0
  77. polyfile/kaitai/parsers/ftl_dat.py +90 -0
  78. polyfile/kaitai/parsers/genmidi_op2.py +161 -0
  79. polyfile/kaitai/parsers/gettext_mo.py +541 -0
  80. polyfile/kaitai/parsers/gif.py +492 -0
  81. polyfile/kaitai/parsers/gimp_brush.py +244 -0
  82. polyfile/kaitai/parsers/glibc_utmp.py +114 -0
  83. polyfile/kaitai/parsers/gltf_binary.py +132 -0
  84. polyfile/kaitai/parsers/google_protobuf.py +151 -0
  85. polyfile/kaitai/parsers/gpt_partition_table.py +175 -0
  86. polyfile/kaitai/parsers/gran_turismo_vol.py +140 -0
  87. polyfile/kaitai/parsers/grub2_font.py +337 -0
  88. polyfile/kaitai/parsers/gzip.py +232 -0
  89. polyfile/kaitai/parsers/hashcat_restore.py +60 -0
  90. polyfile/kaitai/parsers/hccap.py +111 -0
  91. polyfile/kaitai/parsers/hccapx.py +103 -0
  92. polyfile/kaitai/parsers/heaps_pak.py +177 -0
  93. polyfile/kaitai/parsers/heroes_of_might_and_magic_agg.py +116 -0
  94. polyfile/kaitai/parsers/heroes_of_might_and_magic_bmp.py +34 -0
  95. polyfile/kaitai/parsers/icmp_packet.py +136 -0
  96. polyfile/kaitai/parsers/ico.py +129 -0
  97. polyfile/kaitai/parsers/id3v1_1.py +220 -0
  98. polyfile/kaitai/parsers/id3v2_3.py +324 -0
  99. polyfile/kaitai/parsers/id3v2_4.py +423 -0
  100. polyfile/kaitai/parsers/ines.py +282 -0
  101. polyfile/kaitai/parsers/ipv4_packet.py +158 -0
  102. polyfile/kaitai/parsers/ipv6_packet.py +55 -0
  103. polyfile/kaitai/parsers/iso9660.py +544 -0
  104. polyfile/kaitai/parsers/java_class.py +1113 -0
  105. polyfile/kaitai/parsers/jpeg.py +361 -0
  106. polyfile/kaitai/parsers/luks.py +149 -0
  107. polyfile/kaitai/parsers/lzh.py +165 -0
  108. polyfile/kaitai/parsers/mac_os_resource_snd.py +493 -0
  109. polyfile/kaitai/parsers/mach_o.py +3033 -0
  110. polyfile/kaitai/parsers/mach_o_fat.py +92 -0
  111. polyfile/kaitai/parsers/magicavoxel_vox.py +391 -0
  112. polyfile/kaitai/parsers/manifest.json +1 -0
  113. polyfile/kaitai/parsers/mbr_partition_table.py +119 -0
  114. polyfile/kaitai/parsers/mcap.py +1015 -0
  115. polyfile/kaitai/parsers/microsoft_cfb.py +293 -0
  116. polyfile/kaitai/parsers/microsoft_network_monitor_v2.py +309 -0
  117. polyfile/kaitai/parsers/microsoft_pe.py +765 -0
  118. polyfile/kaitai/parsers/mifare_classic.py +706 -0
  119. polyfile/kaitai/parsers/minecraft_nbt.py +449 -0
  120. polyfile/kaitai/parsers/monomakh_sapr_chg.py +69 -0
  121. polyfile/kaitai/parsers/mozilla_mar.py +239 -0
  122. polyfile/kaitai/parsers/mp4.py +333 -0
  123. polyfile/kaitai/parsers/msgpack.py +467 -0
  124. polyfile/kaitai/parsers/nitf.py +1189 -0
  125. polyfile/kaitai/parsers/nt_mdt_pal.py +155 -0
  126. polyfile/kaitai/parsers/ogg.py +118 -0
  127. polyfile/kaitai/parsers/openpgp_message.py +993 -0
  128. polyfile/kaitai/parsers/packet_ppi.py +515 -0
  129. polyfile/kaitai/parsers/pcap.py +344 -0
  130. polyfile/kaitai/parsers/pcf_font.py +506 -0
  131. polyfile/kaitai/parsers/pcx.py +195 -0
  132. polyfile/kaitai/parsers/pcx_dcx.py +79 -0
  133. polyfile/kaitai/parsers/phar_without_stub.py +399 -0
  134. polyfile/kaitai/parsers/php_serialized_value.py +505 -0
  135. polyfile/kaitai/parsers/png.py +721 -0
  136. polyfile/kaitai/parsers/protocol_body.py +260 -0
  137. polyfile/kaitai/parsers/psx_tim.py +104 -0
  138. polyfile/kaitai/parsers/python_pickle.py +718 -0
  139. polyfile/kaitai/parsers/python_pyc_27.py +510 -0
  140. polyfile/kaitai/parsers/quake_mdl.py +441 -0
  141. polyfile/kaitai/parsers/quake_pak.py +112 -0
  142. polyfile/kaitai/parsers/quicktime_mov.py +634 -0
  143. polyfile/kaitai/parsers/rar.py +265 -0
  144. polyfile/kaitai/parsers/regf.py +569 -0
  145. polyfile/kaitai/parsers/renderware_binary_stream.py +877 -0
  146. polyfile/kaitai/parsers/resource_fork.py +611 -0
  147. polyfile/kaitai/parsers/respack.py +57 -0
  148. polyfile/kaitai/parsers/riff.py +409 -0
  149. polyfile/kaitai/parsers/rpm.py +964 -0
  150. polyfile/kaitai/parsers/rtcp_payload.py +579 -0
  151. polyfile/kaitai/parsers/rtp_packet.py +150 -0
  152. polyfile/kaitai/parsers/rtpdump.py +115 -0
  153. polyfile/kaitai/parsers/ruby_marshal.py +423 -0
  154. polyfile/kaitai/parsers/s3m.py +493 -0
  155. polyfile/kaitai/parsers/saints_row_2_vpp_pc.py +254 -0
  156. polyfile/kaitai/parsers/shapefile_index.py +174 -0
  157. polyfile/kaitai/parsers/shapefile_main.py +893 -0
  158. polyfile/kaitai/parsers/some_ip.py +209 -0
  159. polyfile/kaitai/parsers/some_ip_container.py +37 -0
  160. polyfile/kaitai/parsers/some_ip_sd.py +86 -0
  161. polyfile/kaitai/parsers/some_ip_sd_entries.py +160 -0
  162. polyfile/kaitai/parsers/some_ip_sd_options.py +374 -0
  163. polyfile/kaitai/parsers/specpr.py +404 -0
  164. polyfile/kaitai/parsers/sqlite3.py +472 -0
  165. polyfile/kaitai/parsers/ssh_public_key.py +252 -0
  166. polyfile/kaitai/parsers/standard_midi_file.py +390 -0
  167. polyfile/kaitai/parsers/stl.py +111 -0
  168. polyfile/kaitai/parsers/sudoers_ts.py +201 -0
  169. polyfile/kaitai/parsers/swf.py +406 -0
  170. polyfile/kaitai/parsers/systemd_journal.py +361 -0
  171. polyfile/kaitai/parsers/tcp_segment.py +57 -0
  172. polyfile/kaitai/parsers/tga.py +213 -0
  173. polyfile/kaitai/parsers/tls_client_hello.py +293 -0
  174. polyfile/kaitai/parsers/tr_dos_image.py +322 -0
  175. polyfile/kaitai/parsers/tsm.py +198 -0
  176. polyfile/kaitai/parsers/ttf.py +1847 -0
  177. polyfile/kaitai/parsers/udp_datagram.py +42 -0
  178. polyfile/kaitai/parsers/uefi_te.py +236 -0
  179. polyfile/kaitai/parsers/uimage.py +198 -0
  180. polyfile/kaitai/parsers/utf8_string.py +137 -0
  181. polyfile/kaitai/parsers/vfat.py +410 -0
  182. polyfile/kaitai/parsers/vlq_base128_be.py +104 -0
  183. polyfile/kaitai/parsers/vlq_base128_le.py +129 -0
  184. polyfile/kaitai/parsers/vmware_vmdk.py +167 -0
  185. polyfile/kaitai/parsers/vp8_ivf.py +112 -0
  186. polyfile/kaitai/parsers/warcraft_2_pud.py +423 -0
  187. polyfile/kaitai/parsers/wav.py +1014 -0
  188. polyfile/kaitai/parsers/websocket.py +167 -0
  189. polyfile/kaitai/parsers/windows_evt_log.py +304 -0
  190. polyfile/kaitai/parsers/windows_lnk_file.py +467 -0
  191. polyfile/kaitai/parsers/windows_minidump.py +575 -0
  192. polyfile/kaitai/parsers/windows_resource_file.py +243 -0
  193. polyfile/kaitai/parsers/windows_shell_items.py +190 -0
  194. polyfile/kaitai/parsers/windows_systemtime.py +52 -0
  195. polyfile/kaitai/parsers/wmf.py +502 -0
  196. polyfile/kaitai/parsers/xar.py +181 -0
  197. polyfile/kaitai/parsers/xwd.py +189 -0
  198. polyfile/kaitai/parsers/zip.py +685 -0
  199. polyfile/kaitai/parsers/zisofs.py +158 -0
  200. polyfile/kaitai/parsers/zx_spectrum_tap.py +184 -0
  201. polyfile/kaitaimatcher.py +113 -0
  202. polyfile/languagematcher.py +217 -0
  203. polyfile/logger.py +135 -0
  204. polyfile/magic.py +2983 -0
  205. polyfile/magic_defs/COPYING +29 -0
  206. polyfile/magic_defs/__init__.py +0 -0
  207. polyfile/magic_defs/acorn +102 -0
  208. polyfile/magic_defs/adi +13 -0
  209. polyfile/magic_defs/adventure +122 -0
  210. polyfile/magic_defs/aes +29 -0
  211. polyfile/magic_defs/algol68 +35 -0
  212. polyfile/magic_defs/allegro +9 -0
  213. polyfile/magic_defs/alliant +18 -0
  214. polyfile/magic_defs/alpha +32 -0
  215. polyfile/magic_defs/amanda +12 -0
  216. polyfile/magic_defs/amigaos +218 -0
  217. polyfile/magic_defs/android +259 -0
  218. polyfile/magic_defs/animation +1197 -0
  219. polyfile/magic_defs/aout +46 -0
  220. polyfile/magic_defs/apache +28 -0
  221. polyfile/magic_defs/apl +7 -0
  222. polyfile/magic_defs/apple +773 -0
  223. polyfile/magic_defs/application +7 -0
  224. polyfile/magic_defs/applix +13 -0
  225. polyfile/magic_defs/apt +52 -0
  226. polyfile/magic_defs/archive +2586 -0
  227. polyfile/magic_defs/aria +38 -0
  228. polyfile/magic_defs/arm +50 -0
  229. polyfile/magic_defs/asf +132 -0
  230. polyfile/magic_defs/assembler +18 -0
  231. polyfile/magic_defs/asterix +18 -0
  232. polyfile/magic_defs/att3b +41 -0
  233. polyfile/magic_defs/audio +1291 -0
  234. polyfile/magic_defs/avm +33 -0
  235. polyfile/magic_defs/basis +18 -0
  236. polyfile/magic_defs/beetle +7 -0
  237. polyfile/magic_defs/ber +65 -0
  238. polyfile/magic_defs/bflt +14 -0
  239. polyfile/magic_defs/bhl +10 -0
  240. polyfile/magic_defs/bioinformatics +178 -0
  241. polyfile/magic_defs/biosig +154 -0
  242. polyfile/magic_defs/blackberry +8 -0
  243. polyfile/magic_defs/blcr +25 -0
  244. polyfile/magic_defs/blender +50 -0
  245. polyfile/magic_defs/blit +24 -0
  246. polyfile/magic_defs/bm +10 -0
  247. polyfile/magic_defs/bout +11 -0
  248. polyfile/magic_defs/bsdi +33 -0
  249. polyfile/magic_defs/bsi +10 -0
  250. polyfile/magic_defs/btsnoop +13 -0
  251. polyfile/magic_defs/burp +7 -0
  252. polyfile/magic_defs/bytecode +41 -0
  253. polyfile/magic_defs/c-lang +110 -0
  254. polyfile/magic_defs/c64 +531 -0
  255. polyfile/magic_defs/cad +437 -0
  256. polyfile/magic_defs/cafebabe +107 -0
  257. polyfile/magic_defs/cbor +21 -0
  258. polyfile/magic_defs/ccf +14 -0
  259. polyfile/magic_defs/cddb +12 -0
  260. polyfile/magic_defs/chord +15 -0
  261. polyfile/magic_defs/cisco +12 -0
  262. polyfile/magic_defs/citrus +12 -0
  263. polyfile/magic_defs/clarion +27 -0
  264. polyfile/magic_defs/claris +48 -0
  265. polyfile/magic_defs/clipper +65 -0
  266. polyfile/magic_defs/clojure +30 -0
  267. polyfile/magic_defs/coff +98 -0
  268. polyfile/magic_defs/commands +201 -0
  269. polyfile/magic_defs/communications +22 -0
  270. polyfile/magic_defs/compress +461 -0
  271. polyfile/magic_defs/console +1213 -0
  272. polyfile/magic_defs/convex +69 -0
  273. polyfile/magic_defs/coverage +91 -0
  274. polyfile/magic_defs/cracklib +14 -0
  275. polyfile/magic_defs/crypto +31 -0
  276. polyfile/magic_defs/csv +8 -0
  277. polyfile/magic_defs/ctags +6 -0
  278. polyfile/magic_defs/ctf +23 -0
  279. polyfile/magic_defs/cubemap +8 -0
  280. polyfile/magic_defs/cups +56 -0
  281. polyfile/magic_defs/dact +11 -0
  282. polyfile/magic_defs/database +886 -0
  283. polyfile/magic_defs/dataone +47 -0
  284. polyfile/magic_defs/dbpf +15 -0
  285. polyfile/magic_defs/der +146 -0
  286. polyfile/magic_defs/diamond +12 -0
  287. polyfile/magic_defs/dif +33 -0
  288. polyfile/magic_defs/diff +41 -0
  289. polyfile/magic_defs/digital +59 -0
  290. polyfile/magic_defs/dolby +69 -0
  291. polyfile/magic_defs/dsf +25 -0
  292. polyfile/magic_defs/dump +96 -0
  293. polyfile/magic_defs/dwarfs +45 -0
  294. polyfile/magic_defs/dyadic +61 -0
  295. polyfile/magic_defs/ebml +8 -0
  296. polyfile/magic_defs/edid +11 -0
  297. polyfile/magic_defs/editors +43 -0
  298. polyfile/magic_defs/efi +15 -0
  299. polyfile/magic_defs/elf +379 -0
  300. polyfile/magic_defs/encore +22 -0
  301. polyfile/magic_defs/epoc +62 -0
  302. polyfile/magic_defs/erlang +21 -0
  303. polyfile/magic_defs/espressif +57 -0
  304. polyfile/magic_defs/esri +28 -0
  305. polyfile/magic_defs/etf +33 -0
  306. polyfile/magic_defs/fcs +9 -0
  307. polyfile/magic_defs/filesystems +2694 -0
  308. polyfile/magic_defs/finger +16 -0
  309. polyfile/magic_defs/firmware +133 -0
  310. polyfile/magic_defs/flash +62 -0
  311. polyfile/magic_defs/flif +36 -0
  312. polyfile/magic_defs/fonts +449 -0
  313. polyfile/magic_defs/forth +82 -0
  314. polyfile/magic_defs/fortran +9 -0
  315. polyfile/magic_defs/frame +62 -0
  316. polyfile/magic_defs/freebsd +164 -0
  317. polyfile/magic_defs/fsav +128 -0
  318. polyfile/magic_defs/fusecompress +12 -0
  319. polyfile/magic_defs/games +696 -0
  320. polyfile/magic_defs/gcc +17 -0
  321. polyfile/magic_defs/gconv +10 -0
  322. polyfile/magic_defs/gentoo +85 -0
  323. polyfile/magic_defs/geo +166 -0
  324. polyfile/magic_defs/geos +20 -0
  325. polyfile/magic_defs/gimp +77 -0
  326. polyfile/magic_defs/git +13 -0
  327. polyfile/magic_defs/glibc +21 -0
  328. polyfile/magic_defs/gnome +59 -0
  329. polyfile/magic_defs/gnu +173 -0
  330. polyfile/magic_defs/gnumeric +8 -0
  331. polyfile/magic_defs/gpt +240 -0
  332. polyfile/magic_defs/gpu +28 -0
  333. polyfile/magic_defs/grace +21 -0
  334. polyfile/magic_defs/graphviz +12 -0
  335. polyfile/magic_defs/gringotts +48 -0
  336. polyfile/magic_defs/guile +13 -0
  337. polyfile/magic_defs/hardware +12 -0
  338. polyfile/magic_defs/hitachi-sh +30 -0
  339. polyfile/magic_defs/hp +433 -0
  340. polyfile/magic_defs/human68k +26 -0
  341. polyfile/magic_defs/ibm370 +52 -0
  342. polyfile/magic_defs/ibm6000 +35 -0
  343. polyfile/magic_defs/icc +214 -0
  344. polyfile/magic_defs/iff +80 -0
  345. polyfile/magic_defs/images +4210 -0
  346. polyfile/magic_defs/inform +9 -0
  347. polyfile/magic_defs/intel +310 -0
  348. polyfile/magic_defs/interleaf +9 -0
  349. polyfile/magic_defs/island +10 -0
  350. polyfile/magic_defs/ispell +63 -0
  351. polyfile/magic_defs/isz +15 -0
  352. polyfile/magic_defs/java +52 -0
  353. polyfile/magic_defs/javascript +171 -0
  354. polyfile/magic_defs/jpeg +252 -0
  355. polyfile/magic_defs/json +8 -0
  356. polyfile/magic_defs/karma +9 -0
  357. polyfile/magic_defs/kde +11 -0
  358. polyfile/magic_defs/keepass +20 -0
  359. polyfile/magic_defs/kerberos +45 -0
  360. polyfile/magic_defs/kicad +85 -0
  361. polyfile/magic_defs/kml +34 -0
  362. polyfile/magic_defs/lammps +64 -0
  363. polyfile/magic_defs/lecter +6 -0
  364. polyfile/magic_defs/lex +12 -0
  365. polyfile/magic_defs/lif +50 -0
  366. polyfile/magic_defs/linux +557 -0
  367. polyfile/magic_defs/lisp +78 -0
  368. polyfile/magic_defs/llvm +22 -0
  369. polyfile/magic_defs/locoscript +12 -0
  370. polyfile/magic_defs/lua +31 -0
  371. polyfile/magic_defs/luks +126 -0
  372. polyfile/magic_defs/m4 +11 -0
  373. polyfile/magic_defs/mach +303 -0
  374. polyfile/magic_defs/macintosh +505 -0
  375. polyfile/magic_defs/macos +7 -0
  376. polyfile/magic_defs/magic +10 -0
  377. polyfile/magic_defs/magic.mgc +0 -0
  378. polyfile/magic_defs/mail.news +132 -0
  379. polyfile/magic_defs/make +21 -0
  380. polyfile/magic_defs/map +413 -0
  381. polyfile/magic_defs/maple +109 -0
  382. polyfile/magic_defs/marc21 +30 -0
  383. polyfile/magic_defs/mathcad +8 -0
  384. polyfile/magic_defs/mathematica +188 -0
  385. polyfile/magic_defs/matroska +17 -0
  386. polyfile/magic_defs/mcrypt +52 -0
  387. polyfile/magic_defs/measure +44 -0
  388. polyfile/magic_defs/mercurial +13 -0
  389. polyfile/magic_defs/metastore +8 -0
  390. polyfile/magic_defs/meteorological +53 -0
  391. polyfile/magic_defs/microfocus +21 -0
  392. polyfile/magic_defs/mime +9 -0
  393. polyfile/magic_defs/mips +120 -0
  394. polyfile/magic_defs/mirage +8 -0
  395. polyfile/magic_defs/misctools +140 -0
  396. polyfile/magic_defs/mkid +11 -0
  397. polyfile/magic_defs/mlssa +8 -0
  398. polyfile/magic_defs/mmdf +6 -0
  399. polyfile/magic_defs/modem +92 -0
  400. polyfile/magic_defs/modulefile +9 -0
  401. polyfile/magic_defs/motorola +71 -0
  402. polyfile/magic_defs/mozilla +37 -0
  403. polyfile/magic_defs/msdos +2304 -0
  404. polyfile/magic_defs/msooxml +68 -0
  405. polyfile/magic_defs/msvc +222 -0
  406. polyfile/magic_defs/msx +309 -0
  407. polyfile/magic_defs/mup +24 -0
  408. polyfile/magic_defs/music +17 -0
  409. polyfile/magic_defs/nasa +7 -0
  410. polyfile/magic_defs/natinst +24 -0
  411. polyfile/magic_defs/ncr +49 -0
  412. polyfile/magic_defs/neko +12 -0
  413. polyfile/magic_defs/netbsd +251 -0
  414. polyfile/magic_defs/netscape +26 -0
  415. polyfile/magic_defs/netware +11 -0
  416. polyfile/magic_defs/news +13 -0
  417. polyfile/magic_defs/nifty +202 -0
  418. polyfile/magic_defs/nim-lang +29 -0
  419. polyfile/magic_defs/nitpicker +14 -0
  420. polyfile/magic_defs/numpy +9 -0
  421. polyfile/magic_defs/oasis +12 -0
  422. polyfile/magic_defs/ocaml +14 -0
  423. polyfile/magic_defs/octave +6 -0
  424. polyfile/magic_defs/ole2compounddocs +760 -0
  425. polyfile/magic_defs/olf +98 -0
  426. polyfile/magic_defs/openfst +17 -0
  427. polyfile/magic_defs/opentimestamps +16 -0
  428. polyfile/magic_defs/oric +16 -0
  429. polyfile/magic_defs/os2 +186 -0
  430. polyfile/magic_defs/os400 +39 -0
  431. polyfile/magic_defs/os9 +80 -0
  432. polyfile/magic_defs/osf1 +10 -0
  433. polyfile/magic_defs/palm +156 -0
  434. polyfile/magic_defs/parix +13 -0
  435. polyfile/magic_defs/parrot +22 -0
  436. polyfile/magic_defs/pascal +39 -0
  437. polyfile/magic_defs/pbf +11 -0
  438. polyfile/magic_defs/pbm +8 -0
  439. polyfile/magic_defs/pc88 +24 -0
  440. polyfile/magic_defs/pc98 +77 -0
  441. polyfile/magic_defs/pci_ids +116 -0
  442. polyfile/magic_defs/pcjr +8 -0
  443. polyfile/magic_defs/pdf +51 -0
  444. polyfile/magic_defs/pdp +42 -0
  445. polyfile/magic_defs/perl +100 -0
  446. polyfile/magic_defs/pgf +52 -0
  447. polyfile/magic_defs/pgp +581 -0
  448. polyfile/magic_defs/pgp-binary-keys +388 -0
  449. polyfile/magic_defs/pkgadd +7 -0
  450. polyfile/magic_defs/plan9 +25 -0
  451. polyfile/magic_defs/playdate +57 -0
  452. polyfile/magic_defs/plus5 +18 -0
  453. polyfile/magic_defs/pmem +46 -0
  454. polyfile/magic_defs/polyfile_zip +5 -0
  455. polyfile/magic_defs/polyml +23 -0
  456. polyfile/magic_defs/printer +269 -0
  457. polyfile/magic_defs/project +10 -0
  458. polyfile/magic_defs/psdbms +14 -0
  459. polyfile/magic_defs/psl +14 -0
  460. polyfile/magic_defs/pulsar +13 -0
  461. polyfile/magic_defs/puzzle +17 -0
  462. polyfile/magic_defs/pwsafe +14 -0
  463. polyfile/magic_defs/pyramid +12 -0
  464. polyfile/magic_defs/python +305 -0
  465. polyfile/magic_defs/qt +30 -0
  466. polyfile/magic_defs/revision +66 -0
  467. polyfile/magic_defs/riff +840 -0
  468. polyfile/magic_defs/rinex +44 -0
  469. polyfile/magic_defs/ringdove +45 -0
  470. polyfile/magic_defs/rpi +52 -0
  471. polyfile/magic_defs/rpm +45 -0
  472. polyfile/magic_defs/rpmsg +7 -0
  473. polyfile/magic_defs/rst +11 -0
  474. polyfile/magic_defs/rtf +94 -0
  475. polyfile/magic_defs/ruby +55 -0
  476. polyfile/magic_defs/rust +21 -0
  477. polyfile/magic_defs/sc +7 -0
  478. polyfile/magic_defs/sccs +24 -0
  479. polyfile/magic_defs/scientific +144 -0
  480. polyfile/magic_defs/securitycerts +6 -0
  481. polyfile/magic_defs/selinux +24 -0
  482. polyfile/magic_defs/sendmail +37 -0
  483. polyfile/magic_defs/sequent +42 -0
  484. polyfile/magic_defs/sereal +35 -0
  485. polyfile/magic_defs/sgi +144 -0
  486. polyfile/magic_defs/sgml +161 -0
  487. polyfile/magic_defs/sharc +23 -0
  488. polyfile/magic_defs/sinclair +40 -0
  489. polyfile/magic_defs/sisu +18 -0
  490. polyfile/magic_defs/sketch +6 -0
  491. polyfile/magic_defs/smalltalk +25 -0
  492. polyfile/magic_defs/smile +34 -0
  493. polyfile/magic_defs/sniffer +482 -0
  494. polyfile/magic_defs/softquad +40 -0
  495. polyfile/magic_defs/sosi +40 -0
  496. polyfile/magic_defs/spec +21 -0
  497. polyfile/magic_defs/spectrum +184 -0
  498. polyfile/magic_defs/sql +288 -0
  499. polyfile/magic_defs/ssh +39 -0
  500. polyfile/magic_defs/ssl +20 -0
  501. polyfile/magic_defs/statistics +45 -0
  502. polyfile/magic_defs/subtitle +38 -0
  503. polyfile/magic_defs/sun +141 -0
  504. polyfile/magic_defs/svf +5 -0
  505. polyfile/magic_defs/sylk +36 -0
  506. polyfile/magic_defs/symbos +42 -0
  507. polyfile/magic_defs/sysex +429 -0
  508. polyfile/magic_defs/tcl +29 -0
  509. polyfile/magic_defs/teapot +6 -0
  510. polyfile/magic_defs/terminfo +63 -0
  511. polyfile/magic_defs/tex +141 -0
  512. polyfile/magic_defs/tgif +7 -0
  513. polyfile/magic_defs/ti-8x +239 -0
  514. polyfile/magic_defs/timezone +42 -0
  515. polyfile/magic_defs/tplink +95 -0
  516. polyfile/magic_defs/troff +38 -0
  517. polyfile/magic_defs/tuxedo +8 -0
  518. polyfile/magic_defs/typeset +8 -0
  519. polyfile/magic_defs/uf2 +72 -0
  520. polyfile/magic_defs/unicode +15 -0
  521. polyfile/magic_defs/unisig +12 -0
  522. polyfile/magic_defs/unknown +34 -0
  523. polyfile/magic_defs/usd +21 -0
  524. polyfile/magic_defs/uterus +16 -0
  525. polyfile/magic_defs/uuencode +28 -0
  526. polyfile/magic_defs/vacuum-cleaner +54 -0
  527. polyfile/magic_defs/varied.out +46 -0
  528. polyfile/magic_defs/varied.script +21 -0
  529. polyfile/magic_defs/vax +32 -0
  530. polyfile/magic_defs/vicar +17 -0
  531. polyfile/magic_defs/virtual +307 -0
  532. polyfile/magic_defs/virtutech +12 -0
  533. polyfile/magic_defs/visx +32 -0
  534. polyfile/magic_defs/vms +30 -0
  535. polyfile/magic_defs/vmware +6 -0
  536. polyfile/magic_defs/vorbis +155 -0
  537. polyfile/magic_defs/vxl +14 -0
  538. polyfile/magic_defs/warc +16 -0
  539. polyfile/magic_defs/weak +16 -0
  540. polyfile/magic_defs/web +18 -0
  541. polyfile/magic_defs/webassembly +17 -0
  542. polyfile/magic_defs/windows +1811 -0
  543. polyfile/magic_defs/wireless +7 -0
  544. polyfile/magic_defs/wordprocessors +630 -0
  545. polyfile/magic_defs/wsdl +23 -0
  546. polyfile/magic_defs/x68000 +25 -0
  547. polyfile/magic_defs/xdelta +13 -0
  548. polyfile/magic_defs/xenix +106 -0
  549. polyfile/magic_defs/xilinx +58 -0
  550. polyfile/magic_defs/xo65 +37 -0
  551. polyfile/magic_defs/xwindows +43 -0
  552. polyfile/magic_defs/yara +17 -0
  553. polyfile/magic_defs/zfs +96 -0
  554. polyfile/magic_defs/zilog +12 -0
  555. polyfile/magic_defs/zip +126 -0
  556. polyfile/magic_defs/zyxel +17 -0
  557. polyfile/nes.py +144 -0
  558. polyfile/nitf.py +15 -0
  559. polyfile/pdf.py +1264 -0
  560. polyfile/pickles.py +45 -0
  561. polyfile/polyfile.py +409 -0
  562. polyfile/profiling.py +115 -0
  563. polyfile/repl.py +624 -0
  564. polyfile/search.py +310 -0
  565. polyfile/serialization.py +323 -0
  566. polyfile/structmatcher.py +46 -0
  567. polyfile/structs.py +281 -0
  568. polyfile/templates/download.js +162 -0
  569. polyfile/templates/hexdump.css +268 -0
  570. polyfile/templates/hexdump.js +756 -0
  571. polyfile/templates/jquery-3.4.1.min.js +2 -0
  572. polyfile/templates/template.html +119 -0
  573. polyfile/wildcards.py +62 -0
  574. polyfile/zipmatcher.py +183 -0
  575. polyfile_weave-0.5.5.dist-info/METADATA +173 -0
  576. polyfile_weave-0.5.5.dist-info/RECORD +585 -0
  577. polyfile_weave-0.5.5.dist-info/WHEEL +5 -0
  578. polyfile_weave-0.5.5.dist-info/entry_points.txt +2 -0
  579. polyfile_weave-0.5.5.dist-info/licenses/LICENSE +202 -0
  580. polyfile_weave-0.5.5.dist-info/top_level.txt +2 -0
  581. polymerge/__init__.py +1 -0
  582. polymerge/__main__.py +296 -0
  583. polymerge/cfg.py +127 -0
  584. polymerge/polymerge.py +227 -0
  585. polymerge/polytracker.py +190 -0
@@ -0,0 +1,840 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: riff,v 1.45 2022/07/24 23:47:49 christos Exp $
4
+ # riff: file(1) magic for RIFF format
5
+ # See
6
+ #
7
+ # https://www.seanet.com/users/matts/riffmci/riffmci.htm
8
+ # http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf
9
+ # https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
10
+ #
11
+
12
+ # audio format tag. Assume limits: max 1024 bit, 128 channels, 1 MHz
13
+ 0 name riff-wave
14
+ >0 leshort 0x01 \b, Microsoft PCM
15
+ >>14 leshort >0
16
+ >>>14 leshort <1024 \b, %d bit
17
+ >0 leshort 0x02 \b, Microsoft ADPCM
18
+ >0 leshort 0x03 \b, IEEE Float
19
+ >0 leshort 0x04 \b, Compaq VSELP
20
+ >0 leshort 0x05 \b, IBM CVSD
21
+ >0 leshort 0x06 \b, ITU G.711 A-law
22
+ >0 leshort 0x07 \b, ITU G.711 mu-law
23
+ >0 leshort 0x08 \b, Microsoft DTS
24
+ >0 leshort 0x10 \b, OKI ADPCM
25
+ >0 leshort 0x11 \b, IMA ADPCM
26
+ >0 leshort 0x12 \b, MediaSpace ADPCM
27
+ >0 leshort 0x13 \b, Sierra ADPCM
28
+ >0 leshort 0x14 \b, ITU G.723 ADPCM (Yamaha)
29
+ >0 leshort 0x15 \b, DSP Solutions DIGISTD
30
+ >0 leshort 0x16 \b, DSP Solutions DIGIFIX
31
+ >0 leshort 0x17 \b, Dialogic OKI ADPCM
32
+ >0 leshort 0x18 \b, MediaVision ADPCM
33
+ >0 leshort 0x19 \b, HP CU
34
+ >0 leshort 0x20 \b, Yamaha ADPCM
35
+ >0 leshort 0x21 \b, Speech Compression SONARC
36
+ >0 leshort 0x22 \b, DSP Group True Speech
37
+ >0 leshort 0x23 \b, Echo Speech EchoSC1
38
+ >0 leshort 0x24 \b, AudioFile AF36
39
+ >0 leshort 0x25 \b, APTX
40
+ >0 leshort 0x26 \b, AudioFile AF10
41
+ >0 leshort 0x27 \b, Prosody 1612
42
+ >0 leshort 0x28 \b, LRC
43
+ >0 leshort 0x30 \b, Dolby AC2
44
+ >0 leshort 0x31 \b, GSM 6.10
45
+ >0 leshort 0x32 \b, MSN Audio
46
+ >0 leshort 0x33 \b, Antex ADPCME
47
+ >0 leshort 0x34 \b, Control Res VQLPC
48
+ >0 leshort 0x35 \b, Digireal
49
+ >0 leshort 0x36 \b, DigiADPCM
50
+ >0 leshort 0x37 \b, Control Res CR10
51
+ >0 leshort 0x38 \b, NMS VBXADPCM
52
+ >0 leshort 0x39 \b, Roland RDAC
53
+ >0 leshort 0x3A \b, Echo Speech EchoSC3
54
+ >0 leshort 0x3B \b, Rockwell ADPCM
55
+ >0 leshort 0x3C \b, Rockwell Digitalk
56
+ >0 leshort 0x3D \b, Xebec
57
+ >0 leshort 0x40 \b, ITU G.721 ADPCM
58
+ >0 leshort 0x41 \b, ITU G.728 CELP
59
+ >0 leshort 0x42 \b, MSG723
60
+ >0 leshort 0x50 \b, MPEG
61
+ >0 leshort 0x52 \b, RT24
62
+ >0 leshort 0x53 \b, PAC
63
+ >0 leshort 0x55 \b, MPEG Layer 3
64
+ >0 leshort 0x59 \b, Lucent G.723
65
+ >0 leshort 0x60 \b, Cirrus
66
+ >0 leshort 0x61 \b, ESPCM
67
+ >0 leshort 0x62 \b, Voxware
68
+ >0 leshort 0x63 \b, Canopus Atrac
69
+ >0 leshort 0x64 \b, ITU G.726 ADPCM
70
+ >0 leshort 0x65 \b, ITU G.722 ADPCM
71
+ >0 leshort 0x66 \b, DSAT
72
+ >0 leshort 0x67 \b, DSAT Display
73
+ >0 leshort 0x69 \b, Voxware Byte Aligned
74
+ >0 leshort 0x70 \b, Voxware AC8
75
+ >0 leshort 0x71 \b, Voxware AC10
76
+ >0 leshort 0x72 \b, Voxware AC16
77
+ >0 leshort 0x73 \b, Voxware AC20
78
+ >0 leshort 0x74 \b, Voxware MetaVoice
79
+ >0 leshort 0x75 \b, Voxware MetaSound
80
+ >0 leshort 0x76 \b, Voxware RT29HW
81
+ >0 leshort 0x77 \b, Voxware VR12
82
+ >0 leshort 0x78 \b, Voxware VR18
83
+ >0 leshort 0x79 \b, Voxware TQ40
84
+ >0 leshort 0x80 \b, Softsound
85
+ >0 leshort 0x81 \b, Voxware TQ60
86
+ >0 leshort 0x82 \b, MSRT24
87
+ >0 leshort 0x83 \b, ITU G.729A
88
+ >0 leshort 0x84 \b, MVI MV12
89
+ >0 leshort 0x85 \b, DF G.726
90
+ >0 leshort 0x86 \b, DF GSM610
91
+ >0 leshort 0x88 \b, ISIAudio
92
+ >0 leshort 0x89 \b, Onlive
93
+ >0 leshort 0x91 \b, SBC24
94
+ >0 leshort 0x92 \b, Dolby AC3 S/PDIF
95
+ >0 leshort 0x97 \b, ZyXEL ADPCM
96
+ >0 leshort 0x98 \b, Philips LPCBB
97
+ >0 leshort 0x99 \b, Packed
98
+ >0 leshort 0x100 \b, Rhetorex ADPCM
99
+ >0 leshort 0x101 \b, BeCubed Software IRAT
100
+ >0 leshort 0x111 \b, Vivo G.723
101
+ >0 leshort 0x112 \b, Vivo Siren
102
+ >0 leshort 0x123 \b, Digital G.723
103
+ >0 leshort 0x200 \b, Creative ADPCM
104
+ >0 leshort 0x202 \b, Creative FastSpeech8
105
+ >0 leshort 0x203 \b, Creative FastSpeech10
106
+ >0 leshort 0x220 \b, Quarterdeck
107
+ >0 leshort 0x300 \b, FM Towns Snd
108
+ >0 leshort 0x400 \b, BTV Digital
109
+ >0 leshort 0x680 \b, VME VMPCM
110
+ >0 leshort 0x1000 \b, OLIGSM
111
+ >0 leshort 0x1001 \b, OLIADPCM
112
+ >0 leshort 0x1002 \b, OLICELP
113
+ >0 leshort 0x1003 \b, OLISBC
114
+ >0 leshort 0x1004 \b, OLIOPR
115
+ >0 leshort 0x1100 \b, LH Codec
116
+ >0 leshort 0x1400 \b, Norris
117
+ >0 leshort 0x1401 \b, ISIAudio
118
+ >0 leshort 0x1500 \b, Soundspace Music Compression
119
+ >0 leshort 0x2000 \b, AC3 DVM
120
+ >0 leshort 0x2001 \b, DTS
121
+ >2 leshort =1 \b, mono
122
+ >2 leshort =2 \b, stereo
123
+ >2 leshort >2
124
+ >>2 leshort <128 \b, %d channels
125
+ >4 lelong >0
126
+ >>4 lelong <1000000 %d Hz
127
+
128
+ # try to find "fmt "
129
+ 0 name riff-walk
130
+ >0 string fmt\x20
131
+ >>4 lelong >15
132
+ >>>8 use riff-wave
133
+ >0 string LIST
134
+ >>&(4.l+4) use riff-walk
135
+ >0 string DISP
136
+ >>&(4.l+4) use riff-walk
137
+ >0 string bext
138
+ >>&(4.l+4) use riff-walk
139
+ >0 string Fake
140
+ >>&(4.l+4) use riff-walk
141
+ >0 string fact
142
+ >>&(4.l+4) use riff-walk
143
+ >0 string VP8
144
+ >>11 byte 0x9d
145
+ >>>12 byte 0x01
146
+ >>>>13 byte 0x2a \b, VP8 encoding
147
+ >>>>>14 leshort&0x3fff x \b, %d
148
+ >>>>>16 leshort&0x3fff x \bx%d, Scaling:
149
+ >>>>>14 leshort&0xc000 0x0000 \b [none]
150
+ >>>>>14 leshort&0xc000 0x1000 \b [5/4]
151
+ >>>>>14 leshort&0xc000 0x2000 \b [5/3]
152
+ >>>>>14 leshort&0xc000 0x3000 \b [2]
153
+ >>>>>14 leshort&0xc000 0x0000 \bx[none]
154
+ >>>>>14 leshort&0xc000 0x1000 \bx[5/4]
155
+ >>>>>14 leshort&0xc000 0x2000 \bx[5/3]
156
+ >>>>>14 leshort&0xc000 0x3000 \bx[2]
157
+ >>>>>15 byte&0x80 =0x00 \b, YUV color
158
+ >>>>>15 byte&0x80 =0x80 \b, bad color specification
159
+ >>>>>15 byte&0x40 =0x40 \b, no clamping required
160
+ >>>>>15 byte&0x40 =0x00 \b, decoders should clamp
161
+ #>0 string x we got %s
162
+ #>>&(4.l+4) use riff-walk
163
+
164
+ # RecorderGear TR500 call recorder digits (BCD)
165
+ 0 name tr500-call-recorder-digits
166
+ >0 byte&0xF0 0x00 \b0
167
+ >0 byte&0xF0 0x10 \b1
168
+ >0 byte&0xF0 0x20 \b2
169
+ >0 byte&0xF0 0x30 \b3
170
+ >0 byte&0xF0 0x40 \b4
171
+ >0 byte&0xF0 0x50 \b5
172
+ >0 byte&0xF0 0x60 \b6
173
+ >0 byte&0xF0 0x70 \b7
174
+ >0 byte&0xF0 0x80 \b8
175
+ >0 byte&0xF0 0x90 \b9
176
+ >0 byte&0xF0 0xb0 \b*
177
+ >0 byte&0xF0 0xc0 \b#
178
+ >0 byte&0x0F 0 \b0
179
+ >0 byte&0x0F 1 \b1
180
+ >0 byte&0x0F 2 \b2
181
+ >0 byte&0x0F 3 \b3
182
+ >0 byte&0x0F 4 \b4
183
+ >0 byte&0x0F 5 \b5
184
+ >0 byte&0x0F 6 \b6
185
+ >0 byte&0x0F 7 \b7
186
+ >0 byte&0x0F 8 \b8
187
+ >0 byte&0x0F 9 \b9
188
+ >0 byte&0x0F 0xb \b*
189
+ >0 byte&0x0F 0xc \b#
190
+
191
+ # TR500 call recorder extended header
192
+ # From: David Korth <gerbilsoft@gerbilsoft.com>
193
+ # Contains dialed/incoming phone number and timestamp.
194
+ # TODO: Verify byte 15.
195
+ 0 name tr500-call-recorder-header
196
+ >15 byte 2 (outgoing call:
197
+ >15 byte 4 (incoming call:
198
+ >1 byte 0xFF \bno number
199
+ >1 byte !0xFF
200
+ >>1 use tr500-call-recorder-digits
201
+ >>2 byte !0xFF
202
+ >>>2 use tr500-call-recorder-digits
203
+ >>3 byte !0xFF
204
+ >>>3 use tr500-call-recorder-digits
205
+ >>4 byte !0xFF
206
+ >>>4 use tr500-call-recorder-digits
207
+ >>5 byte !0xFF
208
+ >>>5 use tr500-call-recorder-digits
209
+ >>6 byte !0xFF
210
+ >>>6 use tr500-call-recorder-digits
211
+ >>7 byte !0xFF
212
+ >>>7 use tr500-call-recorder-digits
213
+ >>8 byte !0xFF
214
+ >>>8 use tr500-call-recorder-digits
215
+ >9 byte x \b, 20%02x
216
+ >10 byte x \b/%02x
217
+ >11 byte x \b/%02x
218
+ >12 byte x %02x
219
+ >13 byte x \b:%02x
220
+ >14 byte x \b:%02x)
221
+
222
+ # AVI section extended by Patrik Radman <patrik+file-magic@iki.fi>
223
+ #
224
+ 0 string RIFF RIFF (little-endian) data
225
+ # RIFF Palette format
226
+ # Update: Joerg Jenderek
227
+ # URL: https://en.wikipedia.org/wiki/Resource_Interchange_File_Format
228
+ # Reference: https://worms2d.info/Palette_file
229
+ # WAVE/AVI codec registry: https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
230
+ >8 string PAL\ \b, palette
231
+ !:mime application/x-riff
232
+ # color palette by Microsoft Corporation
233
+ !:ext pal
234
+ # file size = chunk size + 8 in most cases
235
+ >>4 ulelong+8 x \b, %u bytes
236
+ # Extended PAL Format
237
+ >>12 string plth \b, extended
238
+ # Simple PAL Format
239
+ >>12 string data
240
+ # data chunk size = color entries * 4 + 4 + sometimes extra (4) appended bytes
241
+ >>>16 ulelong x \b, data size %u
242
+ # palVersion is always 0x0300
243
+ #>>>20 leshort x \b, version %#4.4x
244
+ # palNumEntries specifies the number of palette color entries
245
+ >>>22 uleshort x \b, %u entries
246
+ # after palPalEntry sized (number of color entries * 4 ) vector
247
+ >>>(22.s*4) ubequad x
248
+ # jump relative 22 ( 8 + 16) bytes forward points after end of file or to
249
+ # appended extra bytes like in http://safecolours.rigdenage.com/set(ms).zip/Protan(MS).pal
250
+ >>>>&16 ubelong x \b, extra bytes
251
+ >>>>>&-4 ubelong >0 %#8.8x
252
+ # RIFF Device Independent Bitmap format
253
+ # URL: http://fileformats.archiveteam.org/wiki/RDIB
254
+ >8 string RDIB \b, device-independent bitmap
255
+ !:ext rdi/dib
256
+ >>16 string BM
257
+ >>>30 leshort 12 \b, OS/2 1.x format
258
+ >>>>34 leshort x \b, %d x
259
+ >>>>36 leshort x %d
260
+ >>>30 leshort 64 \b, OS/2 2.x format
261
+ >>>>34 leshort x \b, %d x
262
+ >>>>36 leshort x %d
263
+ >>>30 leshort 40 \b, Windows 3.x format
264
+ >>>>34 lelong x \b, %d x
265
+ >>>>38 lelong x %d x
266
+ >>>>44 leshort x %d
267
+ # RIFF MIDI format
268
+ # URL: http://fileformats.archiveteam.org/wiki/RIFF_MIDI
269
+ >8 string RMID \b, MIDI
270
+ # http://extension.nirsoft.net/rmi
271
+ !:mime audio/mid
272
+ #!:mime audio/x-rmid
273
+ !:ext rmi
274
+ # RIFF Multimedia Movie File format
275
+ # URL: http://fileformats.archiveteam.org/wiki/RIFF_Multimedia_Movie
276
+ >8 string RMMP \b, multimedia movie
277
+ !:mime video/x-mmm
278
+ !:ext mmm
279
+ # RIFF wrapper for MP3
280
+ >8 string RMP3 \b, MPEG Layer 3 audio
281
+ #!:mime audio/x-rmp3
282
+ # Microsoft WAVE format (*.wav)
283
+ # URL: http://fileformats.archiveteam.org/wiki/WAV
284
+ >8 string WAVE \b, WAVE audio
285
+ #!:mime audio/vnd.wave
286
+ !:mime audio/x-wav
287
+ # https://www.macdisk.com/macsigen.php
288
+ #!:apple ????WAVE
289
+ !:ext wav/wave
290
+ >>12 string >\0
291
+ >>>12 use riff-walk
292
+ # TR500 call recorder extended header
293
+ >>16 ulelong 0x1E4
294
+ >>>20 leshort 0x11
295
+ >>>>256 byte 4
296
+ >>>>>256 use tr500-call-recorder-header
297
+ # Update: Joerg Jenderek
298
+ # lower case for Corel Draw version 8 Bidi
299
+ >8 string/c cdr
300
+ # skip Corel CCX Clipart
301
+ >>8 string !CDRXcont
302
+ # Corel Draw Picture
303
+ >>>0 use corel-draw
304
+ # URL: http://fileformats.archiveteam.org/wiki/CCX_(Corel)
305
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/ccx-corel.trid.xml
306
+ >>8 string =CDRXcont \b, Corel Clipart
307
+ !:mime application/x-corel-ccx
308
+ !:ext ccx
309
+ # 3rd chunk data {Corel\040Binary\040Meta\040File}
310
+ #>>>20 string x \b, 3rd '%-s'
311
+ >>>4 ulelong+8 x \b, %u bytes
312
+ # From: Joerg Jenderek
313
+ # URL: https://en.wikipedia.org/wiki/CorelDRAW
314
+ # Reference: http://fileformats.archiveteam.org/wiki/CorelDRAW
315
+ # Picture templates created by newer software start with RIFF type CDT
316
+ >8 string CDT
317
+ >>0 use corel-draw
318
+ # Picture templates with version 4.4
319
+ >8 string CDST
320
+ >>0 use corel-draw
321
+ # pattern created by newer software start with RIFF type PAT
322
+ >8 string PAT
323
+ >>0 use corel-draw
324
+ # From: Joerg Jenderek
325
+ # URL: https://en.wikipedia.org/wiki/Corel_Designer
326
+ # Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer
327
+ >8 string DES
328
+ >>8 string !DESC
329
+ >>>0 use corel-des
330
+ # Corel Draw templates with version 12.5 or Corel Designer illustration 12
331
+ >>8 string =DESC
332
+ # MORE TESTS NEEDED HERE!
333
+ #>>>0 use corel-des
334
+ #>>>0 use corel-draw
335
+ >8 string NUNDROOT \b, Steinberg CuBase
336
+ # From: Joerg Jenderek
337
+ # URL: http://fileformats.archiveteam.org/wiki/MIDI_Instrument_Definition_File
338
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/idf.trid.xml
339
+ # ftp://curscott.servebeer.com/Download/Apps/_Microsoft/
340
+ # Visual%20Studio%206.0%20Professional%20MSDN/
341
+ # SAMPLES/VC98/SDK/GRAPHICS/AUDIO/IDFEDIT/GLOBALS.H
342
+ # Note: called "MIDI Instrument Definition File" by TrID
343
+ >8 string IDF\ LIST \b, MIDI Instrument Definition File
344
+ !:mime audio/x-idf
345
+ !:ext idf
346
+ # 3rd chunk size like: 254 284 286 670
347
+ #>>0x10 ulelong x \b, 3th SIZE %u
348
+ # for debugging purpose display next chunk like: MMAPhdr
349
+ #>>0x14 string x \b, 4th "%-8.8s"
350
+ #>>0x1C ulelong x \b, 4th SIZE 0x%x
351
+ # probably MIDI instrument name like: "Universal-MIDI-Instrument" "instrument name" "General MIDI"
352
+ >>0x30 string x "%s"
353
+ # look for inst TAG
354
+ >>0x31 search/256 inst by
355
+ # probably manufacture name like: "Unspecified Company" "NVidia Corporation"
356
+ >>>&0x24 string x "%s"
357
+ # AVI == Audio Video Interleave
358
+ # Reference: http://fileformats.archiveteam.org/wiki/AVI
359
+ >8 string AVI\040 \b, AVI
360
+ # https://reposcope.com/mimetype/video/x-msvideo
361
+ !:mime video/x-msvideo
362
+ # https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
363
+ #!:mime video/vnd.avi
364
+ !:ext avi/divx
365
+ >>12 string LIST
366
+ >>>20 string hdrlavih
367
+ >>>>&36 lelong x \b, %u x
368
+ >>>>&40 lelong x %u,
369
+ >>>>&4 lelong >1000000 <1 fps,
370
+ >>>>&4 lelong 1000000 1.00 fps,
371
+ >>>>&4 lelong 500000 2.00 fps,
372
+ >>>>&4 lelong 333333 3.00 fps,
373
+ >>>>&4 lelong 250000 4.00 fps,
374
+ >>>>&4 lelong 200000 5.00 fps,
375
+ >>>>&4 lelong 166667 6.00 fps,
376
+ >>>>&4 lelong 142857 7.00 fps,
377
+ >>>>&4 lelong 125000 8.00 fps,
378
+ >>>>&4 lelong 111111 9.00 fps,
379
+ >>>>&4 lelong 100000 10.00 fps,
380
+ # ]9.9,10.1[
381
+ >>>>&4 lelong <101010
382
+ >>>>>&-4 lelong >99010
383
+ >>>>>>&-4 lelong !100000 ~10 fps,
384
+ >>>>&4 lelong 83333 12.00 fps,
385
+ # ]11.9,12.1[
386
+ >>>>&4 lelong <84034
387
+ >>>>>&-4 lelong >82645
388
+ >>>>>>&-4 lelong !83333 ~12 fps,
389
+ >>>>&4 lelong 66667 15.00 fps,
390
+ # ]14.9,15.1[
391
+ >>>>&4 lelong <67114
392
+ >>>>>&-4 lelong >66225
393
+ >>>>>>&-4 lelong !66667 ~15 fps,
394
+ >>>>&4 lelong 50000 20.00 fps,
395
+ >>>>&4 lelong 41708 23.98 fps,
396
+ >>>>&4 lelong 41667 24.00 fps,
397
+ # ]23.9,24.1[
398
+ >>>>&4 lelong <41841
399
+ >>>>>&-4 lelong >41494
400
+ >>>>>>&-4 lelong !41708
401
+ >>>>>>>&-4 lelong !41667 ~24 fps,
402
+ >>>>&4 lelong 40000 25.00 fps,
403
+ # ]24.9,25.1[
404
+ >>>>&4 lelong <40161
405
+ >>>>>&-4 lelong >39841
406
+ >>>>>>&-4 lelong !40000 ~25 fps,
407
+ >>>>&4 lelong 33367 29.97 fps,
408
+ >>>>&4 lelong 33333 30.00 fps,
409
+ # ]29.9,30.1[
410
+ >>>>&4 lelong <33445
411
+ >>>>>&-4 lelong >33223
412
+ >>>>>>&-4 lelong !33367
413
+ >>>>>>>&-4 lelong !33333 ~30 fps,
414
+ >>>>&4 lelong <32224 >30 fps,
415
+ ##>>>>&4 lelong x (%lu)
416
+ ##>>>>&20 lelong x %lu frames,
417
+ # Note: The tests below assume that the AVI has 1 or 2 streams,
418
+ # "vids" optionally followed by "auds".
419
+ # (Should cover 99.9% of all AVIs.)
420
+ # assuming avih length = 56
421
+ >>>88 string LIST
422
+ >>>>96 string strlstrh
423
+ >>>>>108 string vids video:
424
+ >>>>>>&0 lelong 0 uncompressed
425
+ # skip past vids strh
426
+ >>>>>>(104.l+108) string strf
427
+ >>>>>>>(104.l+132) lelong 1 RLE 8bpp
428
+ >>>>>>>(104.l+132) string/c anim Intel RDX
429
+ >>>>>>>(104.l+132) string/c aur2 AuraVision Aura 2
430
+ >>>>>>>(104.l+132) string/c aura AuraVision Aura
431
+ >>>>>>>(104.l+132) string/c bt20 Brooktree MediaStream
432
+ >>>>>>>(104.l+132) string/c btcv Brooktree Composite Video
433
+ >>>>>>>(104.l+132) string/c cc12 Intel YUV12
434
+ >>>>>>>(104.l+132) string/c cdvc Canopus DV
435
+ >>>>>>>(104.l+132) string/c cham Winnov Caviara Cham
436
+ >>>>>>>(104.l+132) string/c cljr Proprietary YUV 4 pixels
437
+ >>>>>>>(104.l+132) string/c cmyk Common Data Format in Printing
438
+ >>>>>>>(104.l+132) string/c cpla Weitek 4:2:0 YUV Planar
439
+ >>>>>>>(104.l+132) string/c cvid Cinepak
440
+ >>>>>>>(104.l+132) string/c cwlt Microsoft Color WLT DIB
441
+ >>>>>>>(104.l+132) string/c cyuv Creative Labs YUV
442
+ >>>>>>>(104.l+132) string/c d261 H.261
443
+ >>>>>>>(104.l+132) string/c d263 H.263
444
+ >>>>>>>(104.l+132) string/c duck TrueMotion 1.0
445
+ >>>>>>>(104.l+132) string/c dve2 DVE-2 Videoconferencing
446
+ >>>>>>>(104.l+132) string/c fljp Field Encoded Motion JPEG
447
+ >>>>>>>(104.l+132) string/c fvf1 Fractal Video Frame
448
+ >>>>>>>(104.l+132) string/c gwlt Microsoft Greyscale WLT DIB
449
+ >>>>>>>(104.l+132) string/c h260 H.260
450
+ >>>>>>>(104.l+132) string/c h261 H.261
451
+ >>>>>>>(104.l+132) string/c h262 H.262
452
+ >>>>>>>(104.l+132) string/c h263 H.263
453
+ >>>>>>>(104.l+132) string/c h264 H.264
454
+ >>>>>>>(104.l+132) string/c h265 H.265
455
+ >>>>>>>(104.l+132) string/c h266 H.266
456
+ >>>>>>>(104.l+132) string/c h267 H.267
457
+ >>>>>>>(104.l+132) string/c h268 H.268
458
+ >>>>>>>(104.l+132) string/c h269 H.269
459
+ >>>>>>>(104.l+132) string/c i263 Intel I.263
460
+ >>>>>>>(104.l+132) string/c i420 Intel Indeo 4
461
+ >>>>>>>(104.l+132) string/c ian Intel RDX
462
+ >>>>>>>(104.l+132) string/c iclb CellB Videoconferencing Codec
463
+ >>>>>>>(104.l+132) string/c ilvc Intel Layered Video
464
+ >>>>>>>(104.l+132) string/c ilvr ITU-T H.263+
465
+ >>>>>>>(104.l+132) string/c iraw Intel YUV Uncompressed
466
+ >>>>>>>(104.l+132) string/c iv30 Intel Indeo 3
467
+ >>>>>>>(104.l+132) string/c iv31 Intel Indeo 3.1
468
+ >>>>>>>(104.l+132) string/c iv32 Intel Indeo 3.2
469
+ >>>>>>>(104.l+132) string/c iv33 Intel Indeo 3.3
470
+ >>>>>>>(104.l+132) string/c iv34 Intel Indeo 3.4
471
+ >>>>>>>(104.l+132) string/c iv35 Intel Indeo 3.5
472
+ >>>>>>>(104.l+132) string/c iv36 Intel Indeo 3.6
473
+ >>>>>>>(104.l+132) string/c iv37 Intel Indeo 3.7
474
+ >>>>>>>(104.l+132) string/c iv38 Intel Indeo 3.8
475
+ >>>>>>>(104.l+132) string/c iv39 Intel Indeo 3.9
476
+ >>>>>>>(104.l+132) string/c iv40 Intel Indeo 4.0
477
+ >>>>>>>(104.l+132) string/c iv41 Intel Indeo 4.1
478
+ >>>>>>>(104.l+132) string/c iv42 Intel Indeo 4.2
479
+ >>>>>>>(104.l+132) string/c iv43 Intel Indeo 4.3
480
+ >>>>>>>(104.l+132) string/c iv44 Intel Indeo 4.4
481
+ >>>>>>>(104.l+132) string/c iv45 Intel Indeo 4.5
482
+ >>>>>>>(104.l+132) string/c iv46 Intel Indeo 4.6
483
+ >>>>>>>(104.l+132) string/c iv47 Intel Indeo 4.7
484
+ >>>>>>>(104.l+132) string/c iv48 Intel Indeo 4.8
485
+ >>>>>>>(104.l+132) string/c iv49 Intel Indeo 4.9
486
+ >>>>>>>(104.l+132) string/c iv50 Intel Indeo 5.0
487
+ >>>>>>>(104.l+132) string/c mpeg MPEG 1 Video Frame
488
+ >>>>>>>(104.l+132) string/c mjpg Motion JPEG
489
+ >>>>>>>(104.l+132) string/c mp42 Microsoft MPEG-4 v2
490
+ >>>>>>>(104.l+132) string/c mp43 Microsoft MPEG-4 v3
491
+ >>>>>>>(104.l+132) string/c mrca MR Codec
492
+ >>>>>>>(104.l+132) string/c mrle Run Length Encoding
493
+ >>>>>>>(104.l+132) string/c msvc Microsoft Video 1
494
+ >>>>>>>(104.l+132) string/c phmo Photomotion
495
+ >>>>>>>(104.l+132) string/c qpeq QPEG 1.1 Format Video
496
+ >>>>>>>(104.l+132) string/c rgbt RGBT
497
+ >>>>>>>(104.l+132) string/c rle4 Run Length Encoded 4
498
+ >>>>>>>(104.l+132) string/c rle8 Run Length Encoded 8
499
+ >>>>>>>(104.l+132) string/c rt21 Intel Indeo 2.1
500
+ >>>>>>>(104.l+132) string/c rvx Intel RDX
501
+ >>>>>>>(104.l+132) string/c sdcc Sun Digital Camera Codec
502
+ >>>>>>>(104.l+132) string/c sfmc Crystal Net SFM Codec
503
+ >>>>>>>(104.l+132) string/c smsc SMSC
504
+ >>>>>>>(104.l+132) string/c smsd SMSD
505
+ >>>>>>>(104.l+132) string/c splc Splash Studios ACM Audio Codec
506
+ >>>>>>>(104.l+132) string/c sqz2 Microsoft VXtreme Video Codec
507
+ >>>>>>>(104.l+132) string/c sv10 Sorenson Video R1
508
+ >>>>>>>(104.l+132) string/c tlms TeraLogic Motion Intraframe Codec A
509
+ >>>>>>>(104.l+132) string/c tlst TeraLogic Motion Intraframe Codec B
510
+ >>>>>>>(104.l+132) string/c tm20 TrueMotion 2.0
511
+ >>>>>>>(104.l+132) string/c tmic TeraLogic Motion Intraframe Codec 2
512
+ >>>>>>>(104.l+132) string/c tmot TrueMotion Video Compression
513
+ >>>>>>>(104.l+132) string/c tr20 TrueMotion RT 2.0
514
+ >>>>>>>(104.l+132) string/c ulti Ultimotion
515
+ >>>>>>>(104.l+132) string/c uyvy UYVY 4:2:2 byte ordering
516
+ >>>>>>>(104.l+132) string/c v422 24-bit YUV 4:2:2 format
517
+ >>>>>>>(104.l+132) string/c v655 16-bit YUV 4:2:2 format
518
+ >>>>>>>(104.l+132) string/c vcr1 ATI VCR 1.0
519
+ >>>>>>>(104.l+132) string/c vcr2 ATI VCR 2.0
520
+ >>>>>>>(104.l+132) string/c vcr3 ATI VCR 3.0
521
+ >>>>>>>(104.l+132) string/c vcr4 ATI VCR 4.0
522
+ >>>>>>>(104.l+132) string/c vcr5 ATI VCR 5.0
523
+ >>>>>>>(104.l+132) string/c vcr6 ATI VCR 6.0
524
+ >>>>>>>(104.l+132) string/c vcr7 ATI VCR 7.0
525
+ >>>>>>>(104.l+132) string/c vcr8 ATI VCR 8.0
526
+ >>>>>>>(104.l+132) string/c vcr9 ATI VCR 9.0
527
+ >>>>>>>(104.l+132) string/c vdct Video Maker Pro DIB
528
+ >>>>>>>(104.l+132) string/c vids YUV 4:2:2 CCIR 601 for V422
529
+ >>>>>>>(104.l+132) string/c vivo Vivo H.263
530
+ >>>>>>>(104.l+132) string/c vixl VIXL
531
+ >>>>>>>(104.l+132) string/c vlv1 VLCAP.DRV
532
+ >>>>>>>(104.l+132) string/c wbvc W9960
533
+ >>>>>>>(104.l+132) string/c x263 mmioFOURCC('X','2','6','3')
534
+ >>>>>>>(104.l+132) string/c xlv0 XL Video Decoder
535
+ >>>>>>>(104.l+132) string/c y211 YUV 2:1:1 Packed
536
+ >>>>>>>(104.l+132) string/c y411 YUV 4:1:1 Packed
537
+ >>>>>>>(104.l+132) string/c y41b YUV 4:1:1 Planar
538
+ >>>>>>>(104.l+132) string/c y41p PC1 4:1:1
539
+ >>>>>>>(104.l+132) string/c y41t PC1 4:1:1 with transparency
540
+ >>>>>>>(104.l+132) string/c y42b YUV 4:2:2 Planar
541
+ >>>>>>>(104.l+132) string/c y42t PC1 4:2:2 with transparency
542
+ >>>>>>>(104.l+132) string/c yc12 Intel YUV12 Codec
543
+ >>>>>>>(104.l+132) string/c yuv8 Winnov Caviar YUV8
544
+ >>>>>>>(104.l+132) string/c yuv9 YUV9
545
+ >>>>>>>(104.l+132) string/c yuy2 YUY2 4:2:2 byte ordering packed
546
+ >>>>>>>(104.l+132) string/c yuyv BI_YUYV, Canopus
547
+ >>>>>>>(104.l+132) string/c fmp4 FFMpeg MPEG-4
548
+ >>>>>>>(104.l+132) string/c div3 DivX 3
549
+ >>>>>>>>112 string/c div3 Low-Motion
550
+ >>>>>>>>112 string/c div4 Fast-Motion
551
+ >>>>>>>(104.l+132) string/c divx DivX 4
552
+ >>>>>>>(104.l+132) string/c dx50 DivX 5
553
+ >>>>>>>(104.l+132) string/c xvid XviD
554
+ >>>>>>>(104.l+132) string/c h264 H.264
555
+ >>>>>>>(104.l+132) string/c wmv3 Windows Media Video 9
556
+ >>>>>>>(104.l+132) string/c h264 X.264 or H.264
557
+ >>>>>>>(104.l+132) lelong 0
558
+ ##>>>>>>>(104.l+132) string x (%.4s)
559
+ # skip past first (video) LIST
560
+ >>>>(92.l+96) string LIST
561
+ >>>>>(92.l+104) string strlstrh
562
+ >>>>>>(92.l+116) string auds \b, audio:
563
+ # auds strh length = 56:
564
+ >>>>>>>(92.l+172) string strf
565
+ >>>>>>>>(92.l+180) leshort 0x0001 uncompressed PCM
566
+ >>>>>>>>(92.l+180) leshort 0x0002 ADPCM
567
+ >>>>>>>>(92.l+180) leshort 0x0006 aLaw
568
+ >>>>>>>>(92.l+180) leshort 0x0007 uLaw
569
+ >>>>>>>>(92.l+180) leshort 0x0050 MPEG-1 Layer 1 or 2
570
+ >>>>>>>>(92.l+180) leshort 0x0055 MPEG-1 Layer 3
571
+ >>>>>>>>(92.l+180) leshort 0x2000 Dolby AC3
572
+ >>>>>>>>(92.l+180) leshort 0x0161 DivX
573
+ ##>>>>>>>>(92.l+180) leshort x (%#.4x)
574
+ >>>>>>>>(92.l+182) leshort 1 (mono,
575
+ >>>>>>>>(92.l+182) leshort 2 (stereo,
576
+ >>>>>>>>(92.l+182) leshort >2 (%d channels,
577
+ >>>>>>>>(92.l+184) lelong x %d Hz)
578
+ # auds strh length = 64:
579
+ >>>>>>>(92.l+180) string strf
580
+ >>>>>>>>(92.l+188) leshort 0x0001 uncompressed PCM
581
+ >>>>>>>>(92.l+188) leshort 0x0002 ADPCM
582
+ >>>>>>>>(92.l+188) leshort 0x0055 MPEG-1 Layer 3
583
+ >>>>>>>>(92.l+188) leshort 0x2000 Dolby AC3
584
+ >>>>>>>>(92.l+188) leshort 0x0161 DivX
585
+ ##>>>>>>>>(92.l+188) leshort x (%#.4x)
586
+ >>>>>>>>(92.l+190) leshort 1 (mono,
587
+ >>>>>>>>(92.l+190) leshort 2 (stereo,
588
+ >>>>>>>>(92.l+190) leshort >2 (%d channels,
589
+ >>>>>>>>(92.l+192) lelong x %d Hz)
590
+ # From: Joerg Jenderek
591
+ # URL: http://fileformats.archiveteam.org/wiki/VDR_(VirtualDub)
592
+ # Reference: http://sourceforge.net/projects/virtualdub/files/virtualdub-win/
593
+ # 1.10.4.35491/VirtualDub-1.10.4-src.7z/src/vdremote/Main.cpp
594
+ # VirtualDub link handler
595
+ >8 string VDRM \b, VirtualDub link
596
+ !:mime video/x-vdr
597
+ !:ext vdr
598
+ >>12 string PATH \b, PATH
599
+ # remote-path to video file
600
+ >>16 pstring/l x %s
601
+ # Animated Cursor format
602
+ # Update: Joerg Jenderek
603
+ # URL: http://fileformats.archiveteam.org/wiki/Windows_Animated_Cursor
604
+ # Reference: https://www.gdgsoft.com/anituner/help/aniformat.htm
605
+ >8 string ACON \b, animated cursor
606
+ !:mime application/x-navi-animation
607
+ # http://extension.nirsoft.net/ani
608
+ #!:mime image/ani
609
+ !:ext ani
610
+ # INAM tag followed by length of title
611
+ >>24 string INAM
612
+ >>>28 pstring/l x "%s"
613
+ # IART tag followed by length of author
614
+ >>>(28.l+32) ubelong 0x49415254
615
+ >>>>&0 pstring/l x %s
616
+ # SoundFont 2 <mpruett@sgi.com>
617
+ # URL: http://fileformats.archiveteam.org/wiki/SoundFont_2.0
618
+ >8 string sfbk \b, SoundFont/Bank
619
+ !:mime audio/x-sfbk
620
+ !:ext sf2
621
+ # MPEG-1 wrapped in a RIFF, apparently
622
+ # URL: http://file.fyicenter.com/17_Video_.DAT_File_Extension_for_VCD_Files.html
623
+ >8 string CDXA \b, wrapped MPEG-1 (CDXA)
624
+ !:mime video/x-cdxa
625
+ !:ext mpg/dat
626
+ # URL: http://fileformats.archiveteam.org/wiki/4X_IMA_ADPCM
627
+ >8 string 4XMV \b, 4X Movie file
628
+ !:mime video/x-4xmv
629
+ !:ext 4xm/4xa
630
+ # AMV-type AVI file: https://wiki.multimedia.cx/index.php?title=AMV
631
+ >8 string AMV\040 \b, AMV
632
+ # http://fileformats.archiveteam.org/wiki/MTV_Video_(.AMV)
633
+ !:mime video/x-amv
634
+ !:ext amv
635
+ #!:ext amv/mtv
636
+ # URL: http://fileformats.archiveteam.org/wiki/WebP
637
+ >8 string WEBP \b, Web/P image
638
+ !:mime image/webp
639
+ !:ext webp
640
+ >>12 use riff-walk
641
+ # From: Joerg Jenderek
642
+ # URL: http://fileformats.archiveteam.org/wiki/RIFF_MIDS
643
+ >8 string MIDS \b, MIDI Stream
644
+ !:mime audio/x-mids
645
+ !:ext mds
646
+ # From: Joerg Jenderek
647
+ # URL: http://mark0.net/soft-trid-e.html
648
+ # Reference: http://fileformats.archiveteam.org/wiki/Trd_(TRID)
649
+ >8 string TRID \b, TrID defs package
650
+ !:mime application/x-trid-trd
651
+ !:ext trd
652
+ # From: Joerg Jenderek
653
+ # URL: https://en.wikipedia.org/wiki/CorelDRAW
654
+ # Reference: http://fileformats.archiveteam.org/wiki/CorelDRAW
655
+ # Note: Since version 3 CorelDraw Pictures are RIFF based
656
+ # but data chunks remain proprietary.
657
+ # Since version 14 til 15 packed as "content/riffData.cdr" and
658
+ # since 16 "content/root.dat" in ZIP container
659
+ # TODO: distinguish templates with version 12.5 from Designer illustration 12
660
+ # display information of RIFF based Corel Draw pictures, templates and patterns
661
+ 0 name corel-draw
662
+ # display second chunk for debugging
663
+ #>8 string x \b, [8]=%.8s
664
+ >0 string x \b, Corel Draw
665
+ #!:mime image/x-coreldraw
666
+ !:mime application/vnd.corel-draw
667
+ # used by newer pictures templates
668
+ >>8 string CDT
669
+ # used by templates with newer versions since 16
670
+ >>>12 string =fver Picture template (root.dat)
671
+ !:ext dat
672
+ # used by templates with older versions with vrsn tag
673
+ >>>12 string !fver
674
+ # used by templates with older versions 14-15
675
+ >>>>11 string >E Picture template (riffData.cdr)
676
+ !:ext cdr
677
+ # used by templates with older versions 11-13
678
+ >>>>11 string <F Picture template
679
+ !:ext cdt/cdrt
680
+ # used by older templates with version 4.4
681
+ >>8 string CDST Picture template
682
+ !:ext cdt
683
+ # used by templates with version 12.5
684
+ >>8 string DESC Picture template
685
+ !:ext cdt
686
+ # used by newer patterns with version 22
687
+ >>8 string PAT Pattern
688
+ !:ext dat
689
+ # remaining older templates, patterns, drawings
690
+ >>8 default x
691
+ # pattern with old version 4.y
692
+ >>>26 ulelong =0x0000206C Pattern
693
+ !:ext pat
694
+ # pattern with newer versions
695
+ >>>26 ulelong =0x00000D2C Pattern
696
+ !:ext pat
697
+ # remaining older templates or pictures
698
+ >>>26 default x
699
+ # used by older versions 5 - 15
700
+ >>>>12 string =vrsn
701
+ # 4th chunk size unequal 282Ch only found for CDR
702
+ >>>>>26 ulelong !0x0000282c Picture
703
+ !:ext cdr
704
+ >>>>>26 default x Picture or template
705
+ !:ext cdr/cdt
706
+ # used by newer versions since 16
707
+ >>>>12 string =fver Picture (root.dat)
708
+ !:ext dat
709
+ # version marked by 1 ASCII char: space~3, ... , F~15, ... , N~22, ... R~22 template
710
+ >11 string x \b, version
711
+ >11 string >\040 '%-.1s'
712
+ >0 use corel-version
713
+ >4 ulelong+8 x \b, %u bytes
714
+ #
715
+ # display numeric version of RIFF based Corel after 3rd RIFF tag
716
+ 0 name corel-version
717
+ # for debugging purpose; vrsn for short content; fver for 16 byte size
718
+ #>12 string x \b, TAG "%-4.4s"
719
+ # 1st data chunk length 2 implies short content version
720
+ >16 ulelong 2
721
+ # vrsn chunk short content interpreted by MajorVersion * 100 + MinorVersion
722
+ >>20 uleshort/100 x %u
723
+ >>20 uleshort%100 >0 \b.%u
724
+ # for debugging purpose display next chunk like: DISP LIST
725
+ #>>22 string x \b, 4th "%-4.4s"
726
+ #>>26 ulelong x \b, 4th SIZE %#x
727
+ # for debugging purpose display 5th chunk like: LIST DISP ccmm osfp
728
+ #>>(26.l+30) string x \b, 5th "%-4.4s"
729
+ # 1st data chunk length 10h implies 16 byte content with version info
730
+ >16 ulelong 0x10
731
+ >>34 ubyte x %u
732
+ >>>33 ubyte >0 \b.%u
733
+ # display information of RIFF based Corel Design formats
734
+ 0 name corel-des
735
+ # display second chunk for debugging
736
+ #>8 string x \b, [8]=%.8s
737
+ >12 string x \b, Corel DESIGNER
738
+ !:mime image/x-corel-des
739
+ #!:mime application/x-vnd.corel.designer.document
740
+ # used by Corel Designer with newer versions since 16
741
+ >12 string =fver graphics (root.dat)
742
+ !:ext dat
743
+ # used by Corel Designer templates with older versions with vrsn tag
744
+ >12 string !fver
745
+ # used by Corel Designer with versions 14-15
746
+ >>11 string >D graphics (riffData.cdr)
747
+ !:ext cdr
748
+ # used by Corel Designer with versions 10-12
749
+ >>11 string <E graphics
750
+ !:ext des
751
+ # version indicated by last ASCII char of second chunk tag
752
+ >11 string x \b, version '%-.1s'
753
+ # but vrsn short content is not always version indicator
754
+ # exceptions: 'A'~11.4 'B'~12 'C'~12.5
755
+ >11 string >D
756
+ >>0 use corel-version
757
+ # for debugging purpose display next chunk like: DISP LIST
758
+ #>>22 string x \b, 4th "%-4.4s"
759
+ #>>26 ulelong x \b, 4th SIZE %#x
760
+ # for debugging purpose display 5th chunk like: LIST osfp
761
+ #>>(26.l+30) string x \b, 5th "%-4.4s"
762
+ >4 ulelong+8 x \b, %u bytes
763
+
764
+ #
765
+ # XXX - some of the below may only appear in little-endian form.
766
+ #
767
+ # Also "MV93" appears to be for one form of Macromedia Director
768
+ # files, and "GDMF" appears to be another multimedia format.
769
+ #
770
+ 0 string RIFX RIFF (big-endian) data
771
+ # RIFF Palette format
772
+ >8 string PAL \b, palette
773
+ >>16 beshort x \b, version %d
774
+ >>18 beshort x \b, %d entries
775
+ # RIFF Device Independent Bitmap format
776
+ >8 string RDIB \b, device-independent bitmap
777
+ >>16 string BM
778
+ >>>30 beshort 12 \b, OS/2 1.x format
779
+ >>>>34 beshort x \b, %d x
780
+ >>>>36 beshort x %d
781
+ >>>30 beshort 64 \b, OS/2 2.x format
782
+ >>>>34 beshort x \b, %d x
783
+ >>>>36 beshort x %d
784
+ >>>30 beshort 40 \b, Windows 3.x format
785
+ >>>>34 belong x \b, %d x
786
+ >>>>38 belong x %d x
787
+ >>>>44 beshort x %d
788
+ # RIFF MIDI format
789
+ >8 string RMID \b, MIDI
790
+ # RIFF Multimedia Movie File format
791
+ >8 string RMMP \b, multimedia movie
792
+ # Microsoft WAVE format (*.wav)
793
+ >8 string WAVE \b, WAVE audio
794
+ >>20 leshort 1 \b, Microsoft PCM
795
+ >>>34 leshort >0 \b, %d bit
796
+ >>22 beshort =1 \b, mono
797
+ >>22 beshort =2 \b, stereo
798
+ >>22 beshort >2 \b, %d channels
799
+ >>24 belong >0 %d Hz
800
+ # Corel Draw Picture big endian not tested by real examples
801
+ #>8 string CDRA \b, Corel Draw Picture
802
+ #>8 string CDR6 \b, Corel Draw Picture, version 6
803
+ >8 string CDR
804
+ >>0 use \^corel-draw
805
+
806
+ # AVI == Audio Video Interleave
807
+ >8 string AVI\040 \b, AVI
808
+ # Animated Cursor format
809
+ >8 string ACON \b, animated cursor
810
+ # Notation Interchange File Format (big-endian only)
811
+ >8 string NIFF \b, Notation Interchange File Format
812
+ # SoundFont 2 <mpruett@sgi.com>
813
+ >8 string sfbk SoundFont/Bank
814
+
815
+ #------------------------------------------------------------------------------
816
+ # Sony Wave64
817
+ # see http://www.vcs.de/fileadmin/user_upload/MBS/PDF/Whitepaper/Informations_about_Sony_Wave64.pdf
818
+ # 128 bit RIFF-GUID { 66666972-912E-11CF-A5D6-28DB04C10000 } in little-endian
819
+ 0 string riff\x2E\x91\xCF\x11\xA5\xD6\x28\xDB\x04\xC1\x00\x00 Sony Wave64 RIFF data
820
+ # 128 bit + total file size (64 bits) so 24 bytes
821
+ # then WAVE-GUID { 65766177-ACF3-11D3-8CD1-00C04F8EDB8A }
822
+ >24 string wave\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A \b, WAVE 64 audio
823
+ !:mime audio/x-w64
824
+ # FMT-GUID { 20746D66-ACF3-11D3-8CD1-00C04F8EDB8A }
825
+ >>40 search/256 fmt\x20\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A \b
826
+ >>>&10 leshort =1 \b, mono
827
+ >>>&10 leshort =2 \b, stereo
828
+ >>>&10 leshort >2 \b, %d channels
829
+ >>>&12 lelong >0 %d Hz
830
+
831
+ #------------------------------------------------------------------------------
832
+ # MBWF/RF64
833
+ # see EBU TECH 3306 https://tech.ebu.ch/docs/tech/tech3306-2009.pdf
834
+ 0 string RF64\xff\xff\xff\xffWAVEds64 MBWF/RF64 audio
835
+ !:mime audio/x-wav
836
+ >40 search/256 fmt\x20 \b
837
+ >>&6 leshort =1 \b, mono
838
+ >>&6 leshort =2 \b, stereo
839
+ >>&6 leshort >2 \b, %d channels
840
+ >>&8 lelong >0 %d Hz