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,1291 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: audio,v 1.127 2023/03/05 20:15:49 christos Exp $
4
+ # audio: file(1) magic for sound formats (see also "iff")
5
+ #
6
+ # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
7
+ # and others
8
+ #
9
+
10
+ # Sun/NeXT audio data
11
+ 0 string .snd Sun/NeXT audio data:
12
+ >12 belong 1 8-bit ISDN mu-law,
13
+ !:mime audio/basic
14
+ >12 belong 2 8-bit linear PCM [REF-PCM],
15
+ !:mime audio/basic
16
+ >12 belong 3 16-bit linear PCM,
17
+ !:mime audio/basic
18
+ >12 belong 4 24-bit linear PCM,
19
+ !:mime audio/basic
20
+ >12 belong 5 32-bit linear PCM,
21
+ !:mime audio/basic
22
+ >12 belong 6 32-bit IEEE floating point,
23
+ !:mime audio/basic
24
+ >12 belong 7 64-bit IEEE floating point,
25
+ !:mime audio/basic
26
+ >12 belong 8 Fragmented sample data,
27
+ >12 belong 10 DSP program,
28
+ >12 belong 11 8-bit fixed point,
29
+ >12 belong 12 16-bit fixed point,
30
+ >12 belong 13 24-bit fixed point,
31
+ >12 belong 14 32-bit fixed point,
32
+ >12 belong 18 16-bit linear with emphasis,
33
+ >12 belong 19 16-bit linear compressed,
34
+ >12 belong 20 16-bit linear with emphasis and compression,
35
+ >12 belong 21 Music kit DSP commands,
36
+ >12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
37
+ !:mime audio/x-adpcm
38
+ >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
39
+ >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
40
+ >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
41
+ >12 belong 27 8-bit A-law (CCITT G.711),
42
+ >20 belong 1 mono,
43
+ >20 belong 2 stereo,
44
+ >20 belong 4 quad,
45
+ >16 belong >0 %d Hz
46
+
47
+ # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
48
+ # that uses little-endian encoding and has a different magic number
49
+ 0 lelong 0x0064732E DEC audio data:
50
+ >12 lelong 1 8-bit ISDN mu-law,
51
+ !:mime audio/x-dec-basic
52
+ >12 lelong 2 8-bit linear PCM [REF-PCM],
53
+ !:mime audio/x-dec-basic
54
+ >12 lelong 3 16-bit linear PCM,
55
+ !:mime audio/x-dec-basic
56
+ >12 lelong 4 24-bit linear PCM,
57
+ !:mime audio/x-dec-basic
58
+ >12 lelong 5 32-bit linear PCM,
59
+ !:mime audio/x-dec-basic
60
+ >12 lelong 6 32-bit IEEE floating point,
61
+ !:mime audio/x-dec-basic
62
+ >12 lelong 7 64-bit IEEE floating point,
63
+ !:mime audio/x-dec-basic
64
+ >12 belong 8 Fragmented sample data,
65
+ >12 belong 10 DSP program,
66
+ >12 belong 11 8-bit fixed point,
67
+ >12 belong 12 16-bit fixed point,
68
+ >12 belong 13 24-bit fixed point,
69
+ >12 belong 14 32-bit fixed point,
70
+ >12 belong 18 16-bit linear with emphasis,
71
+ >12 belong 19 16-bit linear compressed,
72
+ >12 belong 20 16-bit linear with emphasis and compression,
73
+ >12 belong 21 Music kit DSP commands,
74
+ >12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
75
+ !:mime audio/x-dec-basic
76
+ >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
77
+ >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
78
+ >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
79
+ >12 belong 27 8-bit A-law (CCITT G.711),
80
+ >20 lelong 1 mono,
81
+ >20 lelong 2 stereo,
82
+ >20 lelong 4 quad,
83
+ >16 lelong >0 %d Hz
84
+
85
+ # Creative Labs AUDIO stuff
86
+ 0 string MThd Standard MIDI data
87
+ !:mime audio/midi
88
+ >8 beshort x (format %d)
89
+ >10 beshort x using %d track
90
+ >10 beshort >1 \bs
91
+ >12 beshort&0x7fff x at 1/%d
92
+ >12 beshort&0x8000 >0 SMPTE
93
+
94
+ 0 string CTMF Creative Music (CMF) data
95
+ !:mime audio/x-unknown
96
+ 0 string SBI SoundBlaster instrument data
97
+ !:mime audio/x-unknown
98
+ 0 string Creative\ Voice\ File Creative Labs voice data
99
+ !:mime audio/x-unknown
100
+ # is this next line right? it came this way...
101
+ >19 byte 0x1A
102
+ >23 byte >0 - version %d
103
+ >22 byte >0 \b.%d
104
+
105
+ # first entry is also the string "NTRK"
106
+ 0 belong 0x4e54524b MultiTrack sound data
107
+ >4 belong x - version %d
108
+
109
+ # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
110
+ # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
111
+ 0 string EMOD Extended MOD sound data,
112
+ >4 byte&0xf0 x version %d
113
+ >4 byte&0x0f x \b.%d,
114
+ >45 byte x %d instruments
115
+ >83 byte 0 (module)
116
+ >83 byte 1 (song)
117
+
118
+ # Real Audio (Magic .ra\0375)
119
+ 0 belong 0x2e7261fd RealAudio sound file
120
+ !:mime audio/x-pn-realaudio
121
+ 0 string .RMF\0\0\0 RealMedia file
122
+ !:mime application/vnd.rn-realmedia
123
+ #video/x-pn-realvideo
124
+ #video/vnd.rn-realvideo
125
+ #application/vnd.rn-realmedia
126
+ # sigh, there are many mimes for that but the above are the most common.
127
+
128
+ # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
129
+ # Oct 31, 1995
130
+ # fixed by <doj@cubic.org> 2003-06-24
131
+ # Too short...
132
+ #0 string MTM MultiTracker Module sound file
133
+ #0 string if Composer 669 Module sound data
134
+ #0 string JN Composer 669 Module sound data (extended format)
135
+ 0 string MAS_U ULT(imate) Module sound data
136
+
137
+ #0 string FAR Module sound data
138
+ #>4 string >\15 Title: "%s"
139
+
140
+ 0x2c string SCRM ScreamTracker III Module sound data
141
+ >0 string >\0 Title: "%s"
142
+ !:mime audio/x-s3m
143
+
144
+ # .stm before it got above .s3m extension
145
+ 0x16 string \!Scream\! ScreamTracker Module sound data
146
+ >0 string >\0 Title: "%s"
147
+
148
+ # Gravis UltraSound patches
149
+ # From <ache@nagual.ru>
150
+
151
+ 0 string GF1PATCH110\0ID#000002\0 GUS patch
152
+ 0 string GF1PATCH100\0ID#000002\0 Old GUS patch
153
+
154
+ # mime types according to http://www.geocities.com/nevilo/mod.htm:
155
+ # audio/it .it
156
+ # audio/x-zipped-it .itz
157
+ # audio/xm fasttracker modules
158
+ # audio/x-s3m screamtracker modules
159
+ # audio/s3m screamtracker modules
160
+ # audio/x-zipped-mod mdz
161
+ # audio/mod mod
162
+ # audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
163
+
164
+ #
165
+ # Taken from loader code from mikmod version 2.14
166
+ # by Steve McIntyre (stevem@chiark.greenend.org.uk)
167
+ # <doj@cubic.org> added title printing on 2003-06-24
168
+ 0 string MAS_UTrack_V00
169
+ >14 string >/0 ultratracker V1.%.1s module sound data
170
+ !:mime audio/x-mod
171
+ #audio/x-tracker-module
172
+
173
+ 0 string UN05 MikMod UNI format module sound data
174
+
175
+ 0 string Extended\ Module: Fasttracker II module sound data
176
+ !:mime audio/x-mod
177
+ #audio/x-tracker-module
178
+ >17 string >\0 Title: "%s"
179
+
180
+ 21 string/c =!SCREAM! Screamtracker 2 module sound data
181
+ !:mime audio/x-mod
182
+ #audio/x-screamtracker-module
183
+ 21 string BMOD2STM Screamtracker 2 module sound data
184
+ !:mime audio/x-mod
185
+ #audio/x-screamtracker-module
186
+
187
+ 1080 string \!PM! 4-channel Protracker module sound data
188
+ !:mime audio/x-mod
189
+ #audio/x-protracker-module
190
+ >0 string >\0 Title: "%s"
191
+
192
+ 1080 string M.K. 4-channel Protracker module sound data
193
+ !:mime audio/x-mod
194
+ #audio/x-protracker-module
195
+ >0 string >\0 Title: "%s"
196
+
197
+ 1080 string M!K! 4-channel Protracker module sound data
198
+ !:mime audio/x-mod
199
+ #audio/x-protracker-module
200
+ >0 string >\0 Title: "%s"
201
+
202
+ 1080 string FLT4 4-channel Startracker module sound data
203
+ !:mime audio/x-mod
204
+ #audio/x-startracker-module
205
+ >0 string >\0 Title: "%s"
206
+
207
+ 1080 string FLT8 8-channel Startracker module sound data
208
+ !:mime audio/x-mod
209
+ #audio/x-startracker-module
210
+ >0 string >\0 Title: "%s"
211
+
212
+ 1080 string 4CHN 4-channel Fasttracker module sound data
213
+ !:mime audio/x-mod
214
+ #audio/x-fasttracker-module
215
+ >0 string >\0 Title: "%s"
216
+
217
+ 1080 string 6CHN 6-channel Fasttracker module sound data
218
+ !:mime audio/x-mod
219
+ #audio/x-fasttracker-module
220
+ >0 string >\0 Title: "%s"
221
+
222
+ 1080 string 8CHN 8-channel Fasttracker module sound data
223
+ !:mime audio/x-mod
224
+ #audio/x-fasttracker-module
225
+ >0 string >\0 Title: "%s"
226
+
227
+ 1080 string CD81 8-channel Octalyser module sound data
228
+ !:mime audio/x-mod
229
+ #audio/x-octalysertracker-module
230
+ >0 string >\0 Title: "%s"
231
+
232
+ 1080 string OKTA 8-channel Octalyzer module sound data
233
+ !:mime audio/x-mod
234
+ #audio/x-octalysertracker-module
235
+ >0 string >\0 Title: "%s"
236
+
237
+ # Not good enough.
238
+ #1082 string CH
239
+ #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
240
+ 1080 string 16CN 16-channel Taketracker module sound data
241
+ !:mime audio/x-mod
242
+ #audio/x-taketracker-module
243
+ >0 string >\0 Title: "%s"
244
+ 1080 string 32CN 32-channel Taketracker module sound data
245
+ !:mime audio/x-mod
246
+ #audio/x-taketracker-module
247
+ >0 string >\0 Title: "%s"
248
+
249
+ # TOC sound files -Trevor Johnson <trevor@jpj.net>
250
+ #
251
+ 0 string TOC TOC sound file
252
+
253
+ # sidfiles <pooka@iki.fi>
254
+ # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
255
+ 0 string SIDPLAY\ INFOFILE Sidplay info file
256
+
257
+ 0 string PSID PlaySID v2.2+ (AMIGA) sidtune
258
+ >4 beshort >0 w/ header v%d,
259
+ >14 beshort =1 single song,
260
+ >14 beshort >1 %d songs,
261
+ >16 beshort >0 default song: %d
262
+ >0x16 string >\0 name: "%s"
263
+ >0x36 string >\0 author: "%s"
264
+ >0x56 string >\0 copyright: "%s"
265
+
266
+ 0 string RSID RSID sidtune PlaySID compatible
267
+ >4 beshort >0 w/ header v%d,
268
+ >14 beshort =1 single song,
269
+ >14 beshort >1 %d songs,
270
+ >16 beshort >0 default song: %d
271
+ >0x16 string >\0 name: "%s"
272
+ >0x36 string >\0 author: "%s"
273
+ >0x56 string >\0 copyright: "%s"
274
+
275
+ # IRCAM sound files - Michael Pruett <michael@68k.org>
276
+ # http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/IRCAM/IRCAM.html
277
+ 0 belong 0x64a30100 IRCAM file (VAX little-endian)
278
+ 0 belong 0x0001a364 IRCAM file (VAX big-endian)
279
+ 0 belong 0x64a30200 IRCAM file (Sun big-endian)
280
+ 0 belong 0x0002a364 IRCAM file (Sun little-endian)
281
+ 0 belong 0x64a30300 IRCAM file (MIPS little-endian)
282
+ 0 belong 0x0003a364 IRCAM file (MIPS big-endian)
283
+ 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
284
+ 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
285
+ 0 belong 0x0004a364 IRCAM file (NeXT little-endian)
286
+
287
+ # NIST SPHERE <mpruett@sgi.com>
288
+ 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
289
+
290
+ # Sample Vision <mpruett@sgi.com>
291
+ 0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
292
+
293
+ # Audio Visual Research <tonigonenstein@users.sourceforge.net>
294
+ 0 string 2BIT Audio Visual Research file,
295
+ >12 beshort =0 mono,
296
+ >12 beshort =-1 stereo,
297
+ >14 beshort x %d bits
298
+ >16 beshort =0 unsigned,
299
+ >16 beshort =-1 signed,
300
+ >22 belong&0x00ffffff x %d Hz,
301
+ >18 beshort =0 no loop,
302
+ >18 beshort =-1 loop,
303
+ >21 ubyte <128 note %d,
304
+ >22 byte =0 replay 5.485 KHz
305
+ >22 byte =1 replay 8.084 KHz
306
+ >22 byte =2 replay 10.971 KHz
307
+ >22 byte =3 replay 16.168 KHz
308
+ >22 byte =4 replay 21.942 KHz
309
+ >22 byte =5 replay 32.336 KHz
310
+ >22 byte =6 replay 43.885 KHz
311
+ >22 byte =7 replay 47.261 KHz
312
+
313
+ # SGI SoundTrack <mpruett@sgi.com>
314
+ 0 string _SGI_SoundTrack SGI SoundTrack project file
315
+ # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
316
+ 0 string ID3 Audio file with ID3 version 2
317
+ >3 byte x \b.%d
318
+ >4 byte x \b.%d
319
+ >>5 byte &0x80 \b, unsynchronized frames
320
+ >>5 byte &0x40 \b, extended header
321
+ >>5 byte &0x20 \b, experimental
322
+ >>5 byte &0x10 \b, footer present
323
+ >(6.I+10) indirect x \b, contains:
324
+
325
+ # NSF (NES sound file) magic
326
+ 0 string NESM\x1a NES Sound File
327
+ >14 string >\0 ("%s" by
328
+ >46 string >\0 %s, copyright
329
+ >78 string >\0 %s),
330
+ >5 byte x version %d,
331
+ >6 byte x %d tracks,
332
+ >122 byte&0x2 =1 dual PAL/NTSC
333
+ >122 byte&0x1 =1 PAL
334
+ >122 byte&0x1 =0 NTSC
335
+
336
+ # NSFE (Extended NES sound file) magic
337
+ # http://slickproductions.org/docs/NSF/nsfespec.txt
338
+ # From: David Pflug <david@pflug.email>
339
+ 0 string NSFE Extended NES Sound File
340
+ >48 search/0x1000 auth
341
+ >>&0 string >\0 ("%s"
342
+ >>>&1 string >\0 by %s
343
+ >>>>&1 string >\0 \b, copyright %s
344
+ >>>>>&1 string >\0 \b, ripped by %s
345
+ >20 byte x \b), %d tracks,
346
+ >18 byte&0x2 =1 dual PAL/NTSC
347
+ >18 byte&0x2 =0
348
+ >>18 byte&0x1 =1 PAL
349
+ >>18 byte&0x1 =0 NTSC
350
+
351
+ # Type: SNES SPC700 sound files
352
+ # From: Josh Triplett <josh@freedesktop.org>
353
+ 0 string SNES-SPC700\ Sound\ File\ Data\ v SNES SPC700 sound file
354
+ >&0 string 0.30 \b, version %s
355
+ >>0x23 byte 0x1B \b, without ID666 tag
356
+ >>0x23 byte 0x1A \b, with ID666 tag
357
+ >>>0x2E string >\0 \b, song "%.32s"
358
+ >>>0x4E string >\0 \b, game "%.32s"
359
+
360
+ # Impulse tracker module (audio/x-it)
361
+ 0 string IMPM Impulse Tracker module sound data -
362
+ !:mime audio/x-mod
363
+ >4 string >\0 "%s"
364
+ >40 leshort !0 compatible w/ITv%x
365
+ >42 leshort !0 created w/ITv%x
366
+
367
+ # Imago Orpheus module (audio/x-imf)
368
+ 60 string IM10 Imago Orpheus module sound data -
369
+ >0 string >\0 "%s"
370
+
371
+ # From <collver1@attbi.com>
372
+ # These are the /etc/magic entries to decode modules, instruments, and
373
+ # samples in Impulse Tracker's native format.
374
+
375
+ 0 string IMPS Impulse Tracker Sample
376
+ >18 byte &2 16 bit
377
+ >18 byte ^2 8 bit
378
+ >18 byte &4 stereo
379
+ >18 byte ^4 mono
380
+ 0 string IMPI Impulse Tracker Instrument
381
+ >28 leshort !0 ITv%x
382
+ >30 byte !0 %d samples
383
+
384
+ # Yamaha TX Wave: file(1) magic for Yamaha TX Wave audio files
385
+ # From <collver1@attbi.com>
386
+ 0 string LM8953 Yamaha TX Wave
387
+ >22 byte 0x49 looped
388
+ >22 byte 0xC9 non-looped
389
+ >23 byte 1 33kHz
390
+ >23 byte 2 50kHz
391
+ >23 byte 3 16kHz
392
+
393
+ # scream tracker: file(1) magic for Scream Tracker sample files
394
+ #
395
+ # From <collver1@attbi.com>
396
+ 76 string SCRS Scream Tracker Sample
397
+ >0 byte 1 sample
398
+ >0 byte 2 adlib melody
399
+ >0 byte >2 adlib drum
400
+ >31 byte &2 stereo
401
+ >31 byte ^2 mono
402
+ >31 byte &4 16bit little endian
403
+ >31 byte ^4 8bit
404
+ >30 byte 0 unpacked
405
+ >30 byte 1 packed
406
+
407
+ # audio
408
+ # From: Cory Dikkers <cdikkers@swbell.net>
409
+ 0 string MMD0 MED music file, version 0
410
+ 0 string MMD1 OctaMED Pro music file, version 1
411
+ 0 string MMD3 OctaMED Soundstudio music file, version 3
412
+ 0 string OctaMEDCmpr OctaMED Soundstudio compressed file
413
+ 0 string MED MED_Song
414
+ 0 string SymM Symphonie SymMOD music file
415
+ #
416
+ # Track Length (TRL), Tracks (TRK), Samples (SMP), Subsongs (SS)
417
+ # http://lclevy.free.fr/exotica/ahx/ahxformat.txt
418
+ 0 string THX AHX version
419
+ >3 byte =0 1 module data
420
+ >3 byte =1 2 module data
421
+ >11 ubyte x TRK: %u
422
+ >10 ubyte x TRL: %u
423
+ >12 ubyte x SMP: %u
424
+ >13 ubyte x SS: %u
425
+ >(4.H) string x Title: "%.128s"
426
+
427
+ # header is mostly AHX format
428
+ 0 string HVL
429
+ >3 byte <2 Hively Tracker Song
430
+ >3 byte =0 v1 module data
431
+ >3 byte =1 v2 module data
432
+ >11 ubyte x TRK: %u
433
+ >10 ubyte x TRL: %u
434
+ >12 ubyte x SMP: %u
435
+ >13 ubyte x SS: %u
436
+ >8 ubyte/4 =0 CHN: 4
437
+ >8 ubyte/4 >0 CHN: 4+%u
438
+ #>-0 offset <0xffff
439
+ >(4.H) string x Title: "%.128s"
440
+
441
+ #
442
+ 0 string OKTASONG Oktalyzer module data
443
+ #
444
+ 0 string DIGI\ Booster\ module\0 %s
445
+ >20 byte >0 %c
446
+ >>21 byte >0 \b%c
447
+ >>>22 byte >0 \b%c
448
+ >>>>23 byte >0 \b%c
449
+ >610 string >\0 \b, "%s"
450
+ #
451
+ 0 string DBM0 DIGI Booster Pro Module
452
+ >4 byte >0 V%X.
453
+ >>5 byte x \b%02X
454
+ >16 string >\0 \b, "%s"
455
+ #
456
+ 0 string FTMN FaceTheMusic module
457
+ >16 string >\0d \b, "%s"
458
+
459
+ # From: <doj@cubic.org> 2003-06-24
460
+ 0 string AMShdr\32 Velvet Studio AMS Module v2.2
461
+ 0 string Extreme Extreme Tracker AMS Module v1.3
462
+ 0 string DDMF Xtracker DMF Module
463
+ >4 byte x v%i
464
+ >0xD string >\0 Title: "%s"
465
+ >0x2B string >\0 Composer: "%s"
466
+ 0 string DSM\32 Dynamic Studio Module DSM
467
+ 0 string SONG DigiTrekker DTM Module
468
+ 0 string DMDL DigiTrakker MDL Module
469
+ 0 string PSM\32 Protracker Studio PSM Module
470
+ 44 string PTMF Poly Tracker PTM Module
471
+ >0 string >\32 Title: "%s"
472
+ 0 string MT20 MadTracker 2.0 Module MT2
473
+ 0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
474
+ 0 string RTMM RTM Module
475
+ 0x426 string MaDoKaN96 XMS Adlib Module
476
+ >0 string >\0 Composer: "%s"
477
+ 0 string AMF AMF Module
478
+ >4 string >\0 Title: "%s"
479
+ 0 string MODINFO1 Open Cubic Player Module Information MDZ
480
+ 0 string Extended\40Instrument: Fast Tracker II Instrument
481
+
482
+ # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
483
+ # NOA Nancy Codec file
484
+ 0 string \210NOA\015\012\032 NOA Nancy Codec Movie file
485
+ # Yamaha SMAF format
486
+ 0 string MMMD Yamaha SMAF file
487
+ # Sharp Jisaku Melody format for PDC
488
+ 0 string \001Sharp\040JisakuMelody SHARP Cell-Phone ringing Melody
489
+ >20 string Ver01.00 Ver. 1.00
490
+ >>32 byte x , %d tracks
491
+
492
+ # Free lossless audio codec <http://flac.sourceforge.net>
493
+ # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
494
+ 0 string fLaC FLAC audio bitstream data
495
+ !:mime audio/flac
496
+ >4 byte&0x7f >0 \b, unknown version
497
+ >4 byte&0x7f 0 \b
498
+ # some common bits/sample values
499
+ >>20 beshort&0x1f0 0x030 \b, 4 bit
500
+ >>20 beshort&0x1f0 0x050 \b, 6 bit
501
+ >>20 beshort&0x1f0 0x070 \b, 8 bit
502
+ >>20 beshort&0x1f0 0x0b0 \b, 12 bit
503
+ >>20 beshort&0x1f0 0x0f0 \b, 16 bit
504
+ >>20 beshort&0x1f0 0x170 \b, 24 bit
505
+ >>20 byte&0xe 0x0 \b, mono
506
+ >>20 byte&0xe 0x2 \b, stereo
507
+ >>20 byte&0xe 0x4 \b, 3 channels
508
+ >>20 byte&0xe 0x6 \b, 4 channels
509
+ >>20 byte&0xe 0x8 \b, 5 channels
510
+ >>20 byte&0xe 0xa \b, 6 channels
511
+ >>20 byte&0xe 0xc \b, 7 channels
512
+ >>20 byte&0xe 0xe \b, 8 channels
513
+ # sample rates derived from known oscillator frequencies;
514
+ # 24.576 MHz (video/fs=48kHz), 22.5792 (audio/fs=44.1kHz) and
515
+ # 16.384 (other/fs=32kHz).
516
+ >>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz
517
+ >>17 belong&0xfffff0 0x03e800 \b, 16 kHz
518
+ >>17 belong&0xfffff0 0x056220 \b, 22.05 kHz
519
+ >>17 belong&0xfffff0 0x05dc00 \b, 24 kHz
520
+ >>17 belong&0xfffff0 0x07d000 \b, 32 kHz
521
+ >>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz
522
+ >>17 belong&0xfffff0 0x0bb800 \b, 48 kHz
523
+ >>17 belong&0xfffff0 0x0fa000 \b, 64 kHz
524
+ >>17 belong&0xfffff0 0x158880 \b, 88.2 kHz
525
+ >>17 belong&0xfffff0 0x177000 \b, 96 kHz
526
+ >>17 belong&0xfffff0 0x1f4000 \b, 128 kHz
527
+ >>17 belong&0xfffff0 0x2b1100 \b, 176.4 kHz
528
+ >>17 belong&0xfffff0 0x2ee000 \b, 192 kHz
529
+ >>17 belong&0xfffff0 0x3e8000 \b, 256 kHz
530
+ >>17 belong&0xfffff0 0x562200 \b, 352.8 kHz
531
+ >>17 belong&0xfffff0 0x5dc000 \b, 384 kHz
532
+ >>21 byte&0xf >0 \b, >4G samples
533
+ >>21 byte&0xf 0 \b
534
+ >>>22 belong >0 \b, %u samples
535
+ >>>22 belong 0 \b, length unknown
536
+
537
+ # (ISDN) VBOX voice message file (Wolfram Kleff)
538
+ 0 string VBOX VBOX voice message data
539
+
540
+ # ReBorn Song Files (.rbs)
541
+ # David J. Singer <doc@deadvirgins.org.uk>
542
+ 8 string RB40 RBS Song file
543
+ >29 string ReBorn created by ReBorn
544
+ >37 string Propellerhead created by ReBirth
545
+
546
+ # Synthesizer Generator and Kimwitu share their file format
547
+ 0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data
548
+ # Kimwitu++ uses a slightly different magic
549
+ 0 string A#S#C#S#S#L#HUB Kimwitu++ data
550
+
551
+ # From "Simon Hosie
552
+ 0 string TFMX-SONG TFMX module sound data
553
+
554
+ # Monkey's Audio compressed audio format (.ape)
555
+ # From danny.milo@gmx.net (Danny Milosavljevic)
556
+ # New version from Abel Cheung <abel (@) oaka.org>
557
+ 0 string MAC\040 Monkey's Audio compressed format
558
+ !:mime audio/x-ape
559
+ >4 uleshort >0x0F8B version %d
560
+ >>(0x08.l) uleshort =1000 with fast compression
561
+ >>(0x08.l) uleshort =2000 with normal compression
562
+ >>(0x08.l) uleshort =3000 with high compression
563
+ >>(0x08.l) uleshort =4000 with extra high compression
564
+ >>(0x08.l) uleshort =5000 with insane compression
565
+ >>(0x08.l+18) uleshort =1 \b, mono
566
+ >>(0x08.l+18) uleshort =2 \b, stereo
567
+ >>(0x08.l+20) ulelong x \b, sample rate %d
568
+ >4 uleshort <0x0F8C version %d
569
+ >>6 uleshort =1000 with fast compression
570
+ >>6 uleshort =2000 with normal compression
571
+ >>6 uleshort =3000 with high compression
572
+ >>6 uleshort =4000 with extra high compression
573
+ >>6 uleshort =5000 with insane compression
574
+ >>10 uleshort =1 \b, mono
575
+ >>10 uleshort =2 \b, stereo
576
+ >>12 ulelong x \b, sample rate %d
577
+
578
+ # adlib sound files
579
+ # From: Alex Myczko <alex@aiei.ch>
580
+
581
+ # https://github.com/rerrahkr/BambooTracker
582
+ 0 string BambooTracker BambooTracker
583
+ >13 string Mod Module
584
+ >13 string Ist Instrument
585
+ >13 string Bnk Bank
586
+ >22 byte x \b, version %u
587
+ >21 byte x \b.%u
588
+ >20 byte x \b.%u
589
+
590
+ 0 string CC2x CheeseCutter 2 song
591
+
592
+ 0 string RAWADATA RdosPlay RAW
593
+
594
+ 1068 string RoR AMUSIC Adlib Tracker
595
+
596
+ 0 string JCH EdLib
597
+
598
+ 0 string mpu401tr MPU-401 Trakker
599
+
600
+ 0 string SAdT Surprise! Adlib Tracker
601
+ >4 byte x Version %d
602
+
603
+ 0 string XAD! eXotic ADlib
604
+
605
+ 0 string ofTAZ! eXtra Simple Music
606
+
607
+ 0 string FMK! FM Kingtracker Song
608
+
609
+ 0 string DFM DFM Song
610
+
611
+ 0 string \<CUD-FM-File\> CFF Song
612
+
613
+ 0 string _A2module A2M Song
614
+
615
+ # Spectrum 128 tunes (.ay files).
616
+ # From: Emanuel Haupt <ehaupt@critical.ch>
617
+ 0 string ZXAYEMUL Spectrum 128 tune
618
+
619
+ 0 string \0BONK BONK,
620
+ #>5 byte x version %d
621
+ >14 byte x %d channel(s),
622
+ >15 byte =1 lossless,
623
+ >15 byte =0 lossy,
624
+ >16 byte x mid-side
625
+
626
+ 384 string LockStream LockStream Embedded file (mostly MP3 on old Nokia phones)
627
+
628
+ # format VQF (proprietary codec for sound)
629
+ # some infos on the header file available at :
630
+ # http://www.twinvq.org/english/technology_format.html
631
+ 0 string TWIN97012000 VQF data
632
+ >27 short 0 \b, Mono
633
+ >27 short 1 \b, Stereo
634
+ >31 short >0 \b, %d kbit/s
635
+ >35 short >0 \b, %d kHz
636
+
637
+ # Nelson A. de Oliveira (naoliv@gmail.com)
638
+ # .eqf
639
+ 0 string Winamp\ EQ\ library\ file %s
640
+ # it will match only versions like v<digit>.<digit>
641
+ # Since I saw only eqf files with version v1.1 I think that it's OK
642
+ >23 string x \b%.4s
643
+ # .preset
644
+ 0 string [Equalizer\ preset] XMMS equalizer preset
645
+ # .m3u
646
+ 0 search/1 #EXTM3U M3U playlist text
647
+ # .pls
648
+ 0 search/1 [playlist] PLS playlist text
649
+ # licq.conf
650
+ 1 string [licq] LICQ configuration file
651
+
652
+ # Atari ST audio files by Dirk Jagdmann <doj@cubic.org>
653
+ # NOTE: Most SNDH music is packed using ICE, which has
654
+ # magic numbers "ICE!" and "Ice!". Some SNDH music is
655
+ # not packed, so we check for both packed and unpacked.
656
+ 12 string SNDH SNDH Atari ST music
657
+ 0 belong&0xFFDFDFFF 0x49434521
658
+ >14 search/40 NDH SNDH Atari ST music
659
+ >14 search/40 TITL SNDH Atari ST music
660
+ 0 string SC68\ Music-file\ /\ (c)\ (BeN)jami sc68 Atari ST music
661
+
662
+ # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
663
+ 0 string MP+ Musepack audio (MP+)
664
+ !:mime audio/x-musepack
665
+ >3 byte 255 \b, SV pre8
666
+ >3 byte&0xF 0x6 \b, SV 6
667
+ >3 byte&0xF 0x8 \b, SV 8
668
+ >3 byte&0xF 0x7 \b, SV 7
669
+ >>3 byte&0xF0 0x0 \b.0
670
+ >>3 byte&0xF0 0x10 \b.1
671
+ >>3 byte&0xF0 240 \b.15
672
+ >>10 byte&0xF0 0x0 \b, no profile
673
+ >>10 byte&0xF0 0x10 \b, profile 'Unstable/Experimental'
674
+ >>10 byte&0xF0 0x50 \b, quality 0
675
+ >>10 byte&0xF0 0x60 \b, quality 1
676
+ >>10 byte&0xF0 0x70 \b, quality 2 (Telephone)
677
+ >>10 byte&0xF0 0x80 \b, quality 3 (Thumb)
678
+ >>10 byte&0xF0 0x90 \b, quality 4 (Radio)
679
+ >>10 byte&0xF0 0xA0 \b, quality 5 (Standard)
680
+ >>10 byte&0xF0 0xB0 \b, quality 6 (Xtreme)
681
+ >>10 byte&0xF0 0xC0 \b, quality 7 (Insane)
682
+ >>10 byte&0xF0 0xD0 \b, quality 8 (BrainDead)
683
+ >>10 byte&0xF0 0xE0 \b, quality 9
684
+ >>10 byte&0xF0 0xF0 \b, quality 10
685
+ >>27 byte 0x0 \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
686
+ >>27 byte 102 \b, Beta 1.02
687
+ >>27 byte 104 \b, Beta 1.04
688
+ >>27 byte 105 \b, Alpha 1.05
689
+ >>27 byte 106 \b, Beta 1.06
690
+ >>27 byte 110 \b, Release 1.1
691
+ >>27 byte 111 \b, Alpha 1.11
692
+ >>27 byte 112 \b, Beta 1.12
693
+ >>27 byte 113 \b, Alpha 1.13
694
+ >>27 byte 114 \b, Beta 1.14
695
+ >>27 byte 115 \b, Alpha 1.15
696
+
697
+ 0 string MPCK Musepack audio (MPCK)
698
+ !:mime audio/x-musepack
699
+
700
+ # IMY
701
+ # from http://filext.com/detaillist.php?extdetail=IMY
702
+ # https://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
703
+ # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
704
+ # http://www.wx800.com/msg/download/irda/iMelody.pdf
705
+ 0 string BEGIN:IMELODY iMelody Ringtone Format
706
+
707
+ # From: "Mateus Caruccio" <mateus@caruccio.com>
708
+ # guitar pro v3,4,5 from http://filext.com/file-extension/gp3
709
+ 0 string \030FICHIER\ GUITAR\ PRO\ v3. Guitar Pro Ver. 3 Tablature
710
+
711
+ # From: "Leslie P. Polzer" <leslie.polzer@gmx.net>
712
+ 60 string SONG SoundFX Module sound file
713
+
714
+ # Type: Adaptive Multi-Rate Codec
715
+ # URL: http://filext.com/detaillist.php?extdetail=AMR
716
+ # From: Russell Coker <russell@coker.com.au>
717
+ 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony)
718
+ !:mime audio/amr
719
+ !:ext amr
720
+
721
+ # Type: SuperCollider 3 Synth Definition File Format
722
+ # From: Mario Lang <mlang@debian.org>
723
+ 0 string SCgf SuperCollider3 Synth Definition file,
724
+ >4 belong x version %d
725
+
726
+ # Type: True Audio Lossless Audio
727
+ # URL: https://wiki.multimedia.cx/index.php?title=True_Audio
728
+ # From: Mike Melanson <mike@multimedia.cx>
729
+ 0 string TTA1 True Audio Lossless Audio
730
+
731
+ # Type: WavPack Lossless Audio
732
+ # URL: https://wiki.multimedia.cx/index.php?title=WavPack
733
+ # From: Mike Melanson <mike@multimedia.cx>
734
+ 0 string wvpk WavPack Lossless Audio
735
+
736
+ # From Fabio R. Schmidlin <frs@pop.com.br>
737
+ # VGM music file
738
+ 0 string Vgm\040
739
+ >9 ubyte >0 VGM Video Game Music dump v
740
+ !:mime audio/x-vgm
741
+ !:ext vgm
742
+ >>9 ubyte/16 >0 \b%d
743
+ >>9 ubyte&0x0F x \b%d
744
+ >>8 ubyte/16 x \b.%d
745
+ >>8 ubyte&0x0F >0 \b%d
746
+ #Get soundchips
747
+ >>8 ubyte x \b, soundchip(s)=
748
+ >>0x0C ulelong >0 SN76489 (PSG),
749
+ >>0x10 ulelong >0 YM2413 (OPLL),
750
+ >>0x2C ulelong >0 YM2612 (OPN2),
751
+ >>0x30 ulelong >0 YM2151 (OPM),
752
+ >>0x38 ulelong >0 Sega PCM,
753
+ >>0x34 ulelong >0xC
754
+ >>>0x40 ulelong >0 RF5C68 (PCM),
755
+ >>0x34 ulelong >0x10
756
+ >>>0x44 ulelong >0 YM2203 (OPN),
757
+ >>0x34 ulelong >0x14
758
+ >>>0x48 ulelong >0 YM2608 (OPNA),
759
+ >>0x34 ulelong >0x18
760
+ >>>0x4C lelong >0 YM2610 (OPNB),
761
+ >>>0x4C lelong <0 YM2610B (OPNB+2FM),
762
+ >>0x34 ulelong >0x1C
763
+ >>>0x50 ulelong >0 YM3812 (OPL2),
764
+ >>0x34 ulelong >0x20
765
+ >>>0x54 ulelong >0 YM3526 (OPL),
766
+ >>0x34 ulelong >0x24
767
+ >>>0x58 ulelong >0 Y8950 (MSX-Audio),
768
+ >>0x34 ulelong >0x28
769
+ >>>0x5C ulelong >0 YMF262 (OPL3),
770
+ >>0x34 ulelong >0x2C
771
+ >>>0x60 ulelong >0 YMF278B (OPL4),
772
+ >>0x34 ulelong >0x30
773
+ >>>0x64 ulelong >0 YMF271 (OPX),
774
+ >>0x34 ulelong >0x34
775
+ >>>0x68 ulelong >0 YMZ280B (PCMD8),
776
+ >>0x34 ulelong >0x38
777
+ >>>0x6C ulelong >0 RF5C164 (PCM),
778
+ >>0x34 ulelong >0x3C
779
+ >>>0x70 ulelong >0 PWM,
780
+ >>0x34 ulelong >0x40
781
+ >>>0x74 ulelong >0
782
+ >>>>0x78 ubyte 0x00 AY-3-8910,
783
+ >>>>0x78 ubyte 0x01 AY-3-8912,
784
+ >>>>0x78 ubyte 0x02 AY-3-8913,
785
+ >>>>0x78 ubyte 0x03 AY-3-8930,
786
+ >>>>0x78 ubyte 0x10 YM2149,
787
+ >>>>0x78 ubyte 0x11 YM3439,
788
+ >>>>0x78 ubyte 0x12 YMZ284,
789
+ >>>>0x78 ubyte 0x13 YMZ294,
790
+ # VGM 1.61
791
+ >>0x34 ulelong >0x4C
792
+ >>>0x80 ulelong >0 DMG,
793
+ >>0x34 ulelong >0x50
794
+ >>>0x84 lelong >0 NES APU,
795
+ >>>0x84 lelong <0 NES APU with FDS,
796
+ >>0x34 ulelong >0x54
797
+ >>>0x88 ulelong >0 MultiPCM,
798
+ >>0x34 ulelong >0x58
799
+ >>>0x8C ulelong >0 uPD7759 (ADPCM Speech),
800
+ >>0x34 ulelong >0x5C
801
+ >>>0x90 ulelong >0 OKIM6258 (ADPCM Speech),
802
+ >>0x34 ulelong >0x64
803
+ >>>0x98 ulelong >0 OKIM6295 (ADPCM),
804
+ >>0x34 ulelong >0x68
805
+ >>>0x9C ulelong >0 K051649,
806
+ >>0x34 ulelong >0x6C
807
+ >>>0xA0 ulelong >0 K054539,
808
+ >>0x34 ulelong >0x70
809
+ >>>0xA4 ulelong >0 HuC6280,
810
+ >>0x34 ulelong >0x74
811
+ >>>0xA8 ulelong >0 C140,
812
+ >>0x34 ulelong >0x78
813
+ >>>0xAC ulelong >0 K053260,
814
+ >>0x34 ulelong >0x7C
815
+ >>>0xB0 ulelong >0 Pokey,
816
+ >>0x34 ulelong >0x80
817
+ >>>0xB4 ulelong >0 QSound,
818
+ # VGM 1.71
819
+ >>0x34 ulelong >0x84
820
+ >>>0xB8 ulelong >0 SCSP,
821
+ >>0x34 ulelong >0x8C
822
+ >>>0xC0 ulelong >0 WonderSwan,
823
+ >>0x34 ulelong >0x90
824
+ >>>0xC4 ulelong >0 VSU,
825
+ >>0x34 ulelong >0x94
826
+ >>>0xC8 ulelong >0 SAA1099,
827
+ >>0x34 ulelong >0x98
828
+ >>>0xCC ulelong >0 ES5503 (DOC),
829
+ >>0x34 ulelong >0x9C
830
+ >>>0xD0 lelong >0 ES5505 (OTIS),
831
+ >>>0xD0 lelong <0 ES5506 (OTTO),
832
+ >>0x34 ulelong >0xA4
833
+ >>>0xD8 ulelong >0 X1-010,
834
+ >>0x34 ulelong >0xA8
835
+ >>>0xDC ulelong >0 C352,
836
+ >>0x34 ulelong >0xAC
837
+ >>>0xE0 ulelong >0 GA20,
838
+
839
+ # GVOX Encore file format
840
+ # Since this is a proprietary file format and there is no publicly available
841
+ # format specification, this is just based on induction
842
+ #
843
+ 0 string SCOW
844
+ >4 byte 0xc4 GVOX Encore music, version 5.0 or above
845
+ >4 byte 0xc2 GVOX Encore music, version < 5.0
846
+
847
+ 0 string ZBOT
848
+ >4 byte 0xc5 GVOX Encore music, version < 5.0
849
+
850
+ # Summary: Garmin Voice Processing Module (WAVE audios)
851
+ # From: Joerg Jenderek
852
+ # URL: https://www.garmin.com/
853
+ # Reference: http://www.poi-factory.com/node/19580
854
+ # NOTE: there exist 2 other Garmin VPM formats
855
+ 0 string AUDIMG
856
+ # skip text files starting with string "AUDIMG"
857
+ >13 ubyte <13 Garmin Voice Processing Module
858
+ !:mime audio/x-vpm-wav-garmin
859
+ !:ext vpm
860
+ # 3 bytes indicating the voice version (200,220)
861
+ >>6 string x \b, version %3.3s
862
+ # day of release (01-31)
863
+ >>12 ubyte x \b, %.2d
864
+ # month of release (01-12)
865
+ >>13 ubyte x \b.%.2d
866
+ # year of release (like 2006, 2007, 2008)
867
+ >>14 uleshort x \b.%.4d
868
+ # hour of release (0-23)
869
+ >>11 ubyte x %.2d
870
+ # minute of release (0-59)
871
+ >>10 ubyte x \b:%.2d
872
+ # second of release (0-59)
873
+ >>9 ubyte x \b:%.2d
874
+ # if you select a language like german on your garmin device
875
+ # you can only select voice modules with corresponding language byte ID like 1
876
+ >>18 ubyte x \b, language ID %d
877
+ # structure for phrases/sentences?
878
+ # number of voice sample in the 1st phrase?
879
+ #>>19 uleshort x \b, %#x samples
880
+ #>>>21 uleshort >0 \b, at %#4.4x
881
+ #>>>(21.s) ubequad x %#llx
882
+ # 2nd phrase?
883
+ #>>23 uleshort x \b, %#x samples
884
+ #>>>25 uleshort >0 \b, at %#4.4x
885
+ #>>>(25.s) ubequad x %#llx
886
+ # pointer to 1st audio WAV sample
887
+ >>16 uleshort >0
888
+ >>>(16.s) ulelong >0 \b, at %#x
889
+ # WAV length
890
+ # 1 space char after "bytes" to get phrase "bytes RIFF"
891
+ >>>>(16.s+4) ulelong >0 %u bytes
892
+ # look for magic
893
+ >>>>>(&-8.l) string RIFF
894
+ # determine type by ./riff
895
+ >>>>>>&-4 indirect x
896
+ # 2 - ~ 131 WAV samples following same way
897
+ #
898
+ # Summary: encrypted Garmin Voice Processing Module
899
+ # From: Joerg Jenderek
900
+ # URL: https://www.garmin.com/us/products/ontheroad/voicestudio
901
+ # NOTE: Encrypted variant used in voices like DrNightmare, Elfred, Yeti.
902
+ # There exist 2 other Garmin VPM formats
903
+ 0 ubequad 0xa141190fecc8ced6 Garmin Voice Processing Module (encrypted)
904
+ !:mime audio/x-vpm-garmin
905
+ !:ext vpm
906
+
907
+ # From Martin Mueller Skarbiniks Pedersen
908
+ 0 string GDM
909
+ >0x3 byte 0xFE General Digital Music.
910
+ >0x4 string >\0 title: "%s"
911
+ >0x24 string >\0 musician: "%s"
912
+ >>0x44 beshort 0x0D0A
913
+ >>>0x46 byte 0x1A
914
+ >>>>0x47 string GMFS Version
915
+ >>>>0x4B byte x %d.
916
+ >>>>0x4C byte x \b%02d
917
+ >>>>0x4D beshort 0x000 (2GDM v
918
+ >>>>0x4F byte x \b%d.
919
+ >>>>>0x50 byte x \b%d)
920
+
921
+ 0 string MTM Multitracker
922
+ >0x3 byte/16 x Version %d.
923
+ >0x3 byte&0x0F x \b%02d
924
+ >>0x4 string >\0 title: "%s"
925
+
926
+ 0 string MO3
927
+ >3 ubyte <6 MOdule with MP3
928
+ >>3 byte 0 Version 0 (With MP3 and lossless)
929
+ >>3 byte 1 Version 1 (With ogg and lossless)
930
+ >>3 byte 3 Version 2.2
931
+ >>3 byte 4 (With no LAME header)
932
+ >>3 byte 5 Version 2.4
933
+
934
+ 0 string ADRVPACK AProSys module
935
+
936
+ # ftp://ftp.modland.com/pub/documents/format_documentation/\
937
+ # Art%20Of%20Noise%20(.aon).txt
938
+ 0 string AON
939
+ >4 string "ArtOfNoise by Bastian Spiegel(twice/lego)"
940
+ >0x2e string NAME Art of Noise Tracker Song
941
+ >3 string <9
942
+ >3 string 4 (4 voices)
943
+ >3 string 8 (8 voices)
944
+ >>0x36 string >\0 Title: "%s"
945
+
946
+ 0 string FAR
947
+ >0x2c byte 0x0d
948
+ >0x2d byte 0x0a
949
+ >0x2e byte 0x1a
950
+ >>0x3 byte 0xFE Farandole Tracker Song
951
+ >>>0x31 byte/16 x Version %d.
952
+ >>>0x31 byte&0x0F x \b%02d
953
+ >>>>0x4 string >\0 \b, title: "%s"
954
+
955
+ # magic for Klystrack, https://kometbomb.github.io/klystrack/
956
+ # from Alex Myczko <alex@aiei.ch>
957
+ 0 string cyd!song Klystrack song
958
+ >8 byte >0 \b, version %u
959
+ >8 byte >26
960
+ #>>9 byte x \b, channels %u
961
+ #>>10 leshort x \b, time signature %u
962
+ #>>12 leshort x \b, sequence step %u
963
+ #>>14 byte x \b, instruments %u
964
+ #>>15 leshort x \b, patterns %u
965
+ #>>17 leshort x \b, sequences %u
966
+ #>>19 leshort x \b, length %u
967
+ #>>21 leshort x \b, loop point %u
968
+ #>>23 byte x \b, master volume %u
969
+ #>>24 byte x \b, song speed %u
970
+ #>>25 byte x \b, song speed2 %u
971
+ #>>26 byte x \b, song rate %u
972
+ #>>27 belong x \b, flags %#x
973
+ #>>31 byte x \b, multiplex period %u
974
+ #>>32 byte x \b, pitch inaccuracy %u
975
+ >>149 pstring x \b, title %s
976
+
977
+ 0 string cyd!inst Klystrack instrument
978
+
979
+ # magic for WOPL instrument files, https://github.com/Wohlstand/OPL3BankEditor
980
+ # see Specifications/WOPL-and-OPLI-Specification.txt
981
+
982
+ 0 string WOPL3-INST\0 WOPL instrument
983
+ >11 leshort x \b, version %u
984
+ 0 string WOPL3-BANK\0 WOPL instrument bank
985
+ >11 leshort x \b, version %u
986
+
987
+ # AdLib/OPL instrument files. Format specifications on
988
+ # http://www.shikadi.net/moddingwiki
989
+ 0 string Junglevision\ Patch\ File Junglevision instrument data
990
+ 0 string #OPL_II# DMX OP2 instrument data
991
+ 0 string IBK\x1a IBK instrument data
992
+ 0 string 2OP\x1a IBK instrument data, 2 operators
993
+ 0 string 4OP\x1a IBK instrument data, 4 operators
994
+ 2 string ADLIB- AdLib instrument data
995
+ >0 byte x \b, version %u
996
+ >1 byte x \b.%u
997
+
998
+ # CRI ADX ADPCM audio
999
+ # Used by various Sega games.
1000
+ # https://en.wikipedia.org/wiki/ADX_(file_format)
1001
+ # https://wiki.multimedia.cx/index.php/CRI_ADX_file
1002
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1003
+ 0x00 beshort 0x8000
1004
+ >(2.S-2) string (c)CRI CRI ADX ADPCM audio
1005
+ !:ext adx
1006
+ !:mime audio/x-adx
1007
+ !:strength +50
1008
+ >>0x12 byte x v%u
1009
+ >>0x04 byte 0x02 \b, pre-set prediction coefficients
1010
+ >>0x04 byte 0x03 \b, standard ADX
1011
+ >>0x04 byte 0x04 \b, exponential scale
1012
+ >>0x04 byte 0x10 \b, AHX (Dreamcast)
1013
+ >>0x04 byte 0x11 \b, AHX
1014
+ >>0x08 belong x \b, %u Hz
1015
+ >>0x12 byte 0x03
1016
+ >>>0x02 beshort >0x2B
1017
+ >>>>0x18 belong !0 \b, looping
1018
+ >>0x12 byte 0x04
1019
+ >>>0x02 beshort >0x37
1020
+ >>>>0x24 belong !0 \b, looping
1021
+ >>0x13 byte&0x08 0x08 \b, encrypted
1022
+
1023
+ # Lossless audio (.la) (http://www.lossless-audio.com/)
1024
+ 0 string LA
1025
+ >2 string 03 Lossless audio version 0.3
1026
+ >2 string 04 Lossless audio version 0.4
1027
+
1028
+ # Sony PlayStation Audio (.xa)
1029
+ 0 leshort 0x4158 Sony PlayStation Audio
1030
+
1031
+ # Portable Sound Format
1032
+ # Used for audio rips for various consoles.
1033
+ # http://fileformats.archiveteam.org/wiki/Portable_Sound_Format
1034
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1035
+ 0 string PSF
1036
+ >3 byte 0x01
1037
+ >3 byte 0x02
1038
+ >3 byte 0x11
1039
+ >3 byte 0x12
1040
+ >3 byte 0x13
1041
+ >3 byte 0x21
1042
+ >3 byte 0x22
1043
+ >3 byte 0x23
1044
+ >3 byte 0x41
1045
+ >>0 string PSF Portable Sound Format
1046
+ !:mime audio/x-psf
1047
+ >>>3 byte 0x01 (Sony PlayStation)
1048
+ >>>3 byte 0x02 (Sony PlayStation 2)
1049
+ >>>3 byte 0x11 (Sega Saturn)
1050
+ >>>3 byte 0x12 (Sega Dreamcast)
1051
+ >>>3 byte 0x13 (Sega Mega Drive)
1052
+ >>>3 byte 0x21 (Nintendo 64)
1053
+ >>>3 byte 0x22 (Game Boy Advance)
1054
+ >>>3 byte 0x23 (Super NES)
1055
+ >>>3 byte 0x41 (Capcom QSound)
1056
+
1057
+ # Atari 8-bit SAP audio format
1058
+ # http://asap.sourceforge.net/sap-format.html
1059
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1060
+ 0 string SAP\r\n Atari 8-bit SAP audio file
1061
+ !:mime audio/x-sap
1062
+ !:ext sap
1063
+ >5 search/1024 NAME
1064
+ >>&1 string x \b: %s
1065
+ >>5 search/1024 AUTHOR
1066
+ >>>&1 string x by %s
1067
+
1068
+ # Nintendo Wii BRSTM audio format (fields)
1069
+ # NOTE: Assuming HEAD starts at 0x40.
1070
+ # FIXME: Replace 0x48 with HEAD offset plus 8.
1071
+ 0 name nintendo-wii-brstm-fields
1072
+ >(0x10.L) string HEAD \b:
1073
+ >>(0x10.L+0x0C) belong x
1074
+ >>>(&-4.L+0x48) belong x
1075
+ >>>>&-4 byte 0 PCM, signed 8-bit,
1076
+ >>>>&-4 byte 1 PCM, signed 16-bit,
1077
+ >>>>&-4 byte 2 THP ADPCM,
1078
+ >>>>&-3 byte !0 looping,
1079
+ >>>>&-2 byte 1 mono
1080
+ >>>>&-2 byte 2 stereo
1081
+ >>>>&-2 byte 3 3 channels
1082
+ >>>>&-2 byte 4 quad
1083
+ >>>>&-2 byte >4 %u channels
1084
+ >>>>&0 beshort !0 %u Hz
1085
+
1086
+ # Nintendo Wii BRSTM audio format
1087
+ # https://wiibrew.org/wiki/BRSTM_file
1088
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1089
+ 0 string RSTM Nintendo Wii BRSTM audio file
1090
+ !:mime audio/x-brstm
1091
+ !:ext brstm
1092
+ # Wii is big-endian, so default to BE.
1093
+ >4 beshort 0xFEFF
1094
+ >>0 use nintendo-wii-brstm-fields
1095
+ >4 leshort 0xFEFF
1096
+ >>0 use \^nintendo-wii-brstm-fields
1097
+
1098
+ # Nintendo 3DS BCSTM audio format (fields)
1099
+ 0 name nintendo-3ds-bcstm-fields
1100
+ >(0x18.l) string INFO \b:
1101
+ # INFO block: Stream information starts at 0x20 (minus 4 for the 'INFO' magic)
1102
+ >>&0x1C byte 0 PCM, signed 8-bit,
1103
+ >>&0x1C byte 1 PCM, signed 16-bit,
1104
+ >>&0x1C byte 2 DSP ADPCM,
1105
+ >>&0x1C byte 3 IMA ADPCM,
1106
+ >>&0x1D byte !0 looping,
1107
+ >>&0x1E byte 1 mono
1108
+ >>&0x1E byte 2 stereo
1109
+ >>&0x1E byte 3 3 channels
1110
+ >>&0x1E byte 4 quad
1111
+ >>&0x1E byte >4 %u channels
1112
+ >>&0x20 lelong !0 %u Hz
1113
+
1114
+ # Nintendo 3DS BCSTM audio format
1115
+ # https://www.3dbrew.org/wiki/BCSTM
1116
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1117
+ 0 string CSTM Nintendo 3DS BCSTM audio file
1118
+ !:mime audio/x-bcstm
1119
+ !:ext bcstm
1120
+ # 3DS is little-endian, so default to LE.
1121
+ >4 leshort 0xFEFF
1122
+ >>0 use nintendo-3ds-bcstm-fields
1123
+ >4 beshort 0xFEFF
1124
+ >>0 use \^nintendo-3ds-bcstm-fields
1125
+
1126
+ # Nintendo Wii U BFSTM audio format
1127
+ # http://mk8.tockdom.com/wiki/BFSTM_(File_Format)
1128
+ # NOTE: This format is very similar to BCSTM.
1129
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1130
+ 0 string FSTM Nintendo Wii U BFSTM audio file
1131
+ !:mime audio/x-bfstm
1132
+ !:ext bfstm
1133
+ # BFSTM is used on both Wii U (BE) and Switch (LE),
1134
+ # so default to LE.
1135
+ >4 leshort 0xFEFF
1136
+ >>0 use nintendo-3ds-bcstm-fields
1137
+ >4 beshort 0xFEFF
1138
+ >>0 use \^nintendo-3ds-bcstm-fields
1139
+
1140
+ # Nintendo 3DS BCSTM audio format (fields)
1141
+ 0 name nintendo-3ds-bcwav-fields
1142
+ >(0x18.l) string INFO \b:
1143
+ # INFO block (minus 4 for INFO magic)
1144
+ >>&0x4 byte 0 PCM, signed 8-bit,
1145
+ >>&0x4 byte 1 PCM, signed 16-bit,
1146
+ >>&0x4 byte 2 DSP ADPCM,
1147
+ >>&0x4 byte 3 IMA ADPCM,
1148
+ >>&0x5 byte !0 looping,
1149
+ >>&0x8 lelong x stereo
1150
+ >>&0x8 lelong !0 %u Hz
1151
+
1152
+ # Nintendo 3DS BCWAV audio format
1153
+ # https://www.3dbrew.org/wiki/BCWAV
1154
+ # Added by David Korth <gerbilsoft@gerbilsoft.com>
1155
+ 0 string CWAV Nintendo 3DS BCWAV audio file
1156
+ !:mime audio/x-bcwav
1157
+ !:ext bcwav
1158
+ # 3DS is little-endian, so default to LE.
1159
+ >4 leshort 0xFEFF
1160
+ >>0 use nintendo-3ds-bcwav-fields
1161
+ >4 beshort 0xFEFF
1162
+ >>0 use \^nintendo-3ds-bcwav-fields
1163
+
1164
+ # Philips DSDIFF audio format (Direct Stream Digital Interchange File Format)
1165
+ # Used for DSD audio recordings and Super Audio CD (SACD) mastering annotations
1166
+ # https://dsd-guide.com/sites/default/files/white-papers/DSDIFF_1.5_Spec.pdf
1167
+ # From: Toni Ruottu <toni.ruottu@iki.fi>
1168
+ 0 string FRM8
1169
+ 12 string DSD\x20 DSDIFF audio bitstream data
1170
+ !:mime audio/x-dff
1171
+ !:ext dff
1172
+
1173
+ # format version chunk
1174
+ >&0 string FVER
1175
+ # version 1
1176
+ >>&8 byte 1
1177
+
1178
+ # v1 / sampling resolution ( 1 bit PDM only )
1179
+ >>>&0 string x \b, 1 bit
1180
+
1181
+ # v1 / sound property chunk
1182
+ >>>&0 search/0xff PROP
1183
+ >>>>&8 string SND
1184
+
1185
+ # v1 / sound property chunk / channel configuration chunk
1186
+ >>>>>&0 search/0xff CHNL
1187
+ >>>>>>&8 ubeshort 1 \b, mono
1188
+ >>>>>>&8 ubeshort 2
1189
+ >>>>>>>&0 string SLFTSRGT \b, stereo
1190
+ >>>>>>>&0 default x \b, 2 channels
1191
+ >>>>>>&8 ubeshort 3
1192
+ >>>>>>>&0 string SLFTSRGTLFE\x20 \b, 2.1 stereo
1193
+ >>>>>>>&0 string SLFTSRGTC\x20\x20\x20 \b, 3.0 stereo
1194
+ >>>>>>>&0 default x \b, 3 channels
1195
+ >>>>>>&8 ubeshort 4
1196
+ >>>>>>>&0 string MLFTMRGTLS\x20\x20RS\x20\x20 \b, 4.0 surround
1197
+ >>>>>>>&0 string SLFTSRGTC\x20\x20\x20LFE\x20 \b, 3.1 stereo
1198
+ >>>>>>>&0 default x \b, 4 channels
1199
+ >>>>>>&8 ubeshort 5
1200
+ >>>>>>>&0 string MLFTMRGTC\x20\x20\x20LS\x20\x20RS\x20\x20 \b, 5.0 surround
1201
+ >>>>>>>&0 string MLFTMRGTLFE\x20LS\x20\x20RS\x20\x20 \b, 4.1 surround
1202
+ >>>>>>>&0 default x \b, 5 channels
1203
+ >>>>>>&8 ubeshort 6
1204
+ >>>>>>>&0 string MLFTMRGTC\x20\x20\x20LFE\x20LS\x20\x20RS\x20\x20 \b, 5.1 surround
1205
+ >>>>>>>&0 default x \b, 6 channels
1206
+ >>>>>>&8 ubeshort >6 \b, %u channels
1207
+
1208
+ # v1 / sound property chunk / sample rate chunk
1209
+ >>>>>&0 search/0xff FS\x20\x20
1210
+ >>>>>>&0 string x \b,
1211
+ >>>>>>&8 ubelong%44100 0
1212
+ >>>>>>>&-4 ubelong/44100 x "DSD %u"
1213
+ >>>>>>>&-4 ubelong x %u Hz
1214
+
1215
+ # v1 / sound property chunk / compression type chunk
1216
+ >>>>>&0 search/0xff CMPR
1217
+ >>>>>>&8 string DSD\x20 \b, no compression
1218
+ >>>>>>&8 string DST\x20 \b, DST compression
1219
+ >>>>>>&8 default x \b, unknown compression
1220
+
1221
+ # v1 / quest for metadata
1222
+ >>>&0 string x
1223
+
1224
+ # v1 / quest for metadata / edited master information chunk
1225
+ >>>>&0 search DIIN
1226
+ >>>>>&0 ubequad >0 \b, "edited master" metadata
1227
+
1228
+ # v1 / quest for metadata / ID3 chunk ( defacto standard )
1229
+ >>>>&0 search ID3\x20
1230
+ >>>>>&8 string ID3 \b, ID3 version 2
1231
+ >>>>>&0 byte x \b.%u
1232
+ >>>>>&1 byte x \b.%u
1233
+
1234
+ # v1 / quest for metadata / failure ( possibly due to -P bytes=... being too low )
1235
+ >>>>&0 default x \b, ID3 missing (or unreachable)
1236
+
1237
+ # version > 1 or 0
1238
+ >>&0 default x \b, unknown version
1239
+
1240
+ # Sony DSF audio format (Direct Stream Digital Stream File)
1241
+ # Used for lossless digital storage of songs produced as DSD audio
1242
+ # Portable analog of a track stored on a Super Audio CD (SACD)
1243
+ # https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf
1244
+ # From: Toni Ruottu <toni.ruottu@iki.fi>
1245
+ 0 string DSD\x20 DSF audio bitstream data
1246
+ !:mime audio/x-dsf
1247
+ !:ext dsf
1248
+
1249
+ # format chunk
1250
+ >28 string fmt\x20
1251
+ # version 1
1252
+ >>&8 ulelong 1
1253
+
1254
+ # v1 / sampling resolution ( 1 bit PDM only )
1255
+ # NOTE: the spec incorrectly uses "bits per sample" instead of "bits per byte"
1256
+ >>>&0 string x \b, 1 bit
1257
+
1258
+ # v1 / channel configuration
1259
+ >>>>&4 ulelong 1 \b, mono
1260
+ >>>>&4 ulelong 2 \b, stereo
1261
+ >>>>&4 ulelong 3 \b, 3.0 stereo
1262
+ >>>>&4 ulelong 4 \b, 4.0 surround
1263
+ >>>>&4 ulelong 5 \b, 3.1 stereo
1264
+ >>>>&4 ulelong 6 \b, 5.0 surround
1265
+ >>>>&4 ulelong 7 \b, 5.1 surround
1266
+ >>>>&0 default x
1267
+ >>>>>&4 ulelong x \b, %u channels
1268
+
1269
+ # v1 / sample rate chunk
1270
+ >>>>&0 string x \b,
1271
+ >>>>&12 ulelong%44100 0
1272
+ >>>>>&-4 ulelong/44100 x "DSD %u"
1273
+ >>>>&12 ulelong x %u Hz
1274
+
1275
+ # v1 / compression
1276
+ >>>>&0 string x
1277
+ >>>>>&0 ulelong 0 \b, no compression
1278
+ >>>>>&0 default x \b, unknown compression
1279
+
1280
+ # v1 / embedded ID3v2 metadata
1281
+ >>>0 string x \b, ID3
1282
+ >>>>20 ulequad !0
1283
+ >>>>>(20.q) string ID3 version 2
1284
+ >>>>>>&0 byte x \b.%u
1285
+ >>>>>>&1 byte x \b.%u
1286
+ # unable to verify ID3 ( possibly due to -P bytes=... being too low )
1287
+ >>>>>&0 default x unreachable
1288
+ >>>>&0 default x missing
1289
+
1290
+ # version > 1 or 0
1291
+ >>&0 default x \b, unknown version