@blamnetwork/blf 1.0.0-alpha.1

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.
Files changed (235) hide show
  1. package/README.md +82 -0
  2. package/dist/bitstream/enum.d.ts +6 -0
  3. package/dist/bitstream/enum.d.ts.map +1 -0
  4. package/dist/bitstream/enum.js +15 -0
  5. package/dist/bitstream/enums.d.ts +21 -0
  6. package/dist/bitstream/enums.d.ts.map +1 -0
  7. package/dist/bitstream/enums.js +31 -0
  8. package/dist/bitstream/errors.d.ts +5 -0
  9. package/dist/bitstream/errors.d.ts.map +1 -0
  10. package/dist/bitstream/errors.js +11 -0
  11. package/dist/bitstream/index.d.ts +7 -0
  12. package/dist/bitstream/index.d.ts.map +1 -0
  13. package/dist/bitstream/index.js +5 -0
  14. package/dist/bitstream/math.d.ts +28 -0
  15. package/dist/bitstream/math.d.ts.map +1 -0
  16. package/dist/bitstream/math.js +149 -0
  17. package/dist/bitstream/reader.d.ts +81 -0
  18. package/dist/bitstream/reader.d.ts.map +1 -0
  19. package/dist/bitstream/reader.js +400 -0
  20. package/dist/bitstream/writer.d.ts +56 -0
  21. package/dist/bitstream/writer.d.ts.map +1 -0
  22. package/dist/bitstream/writer.js +330 -0
  23. package/dist/blam/common/cache/index.d.ts +2 -0
  24. package/dist/blam/common/cache/index.d.ts.map +1 -0
  25. package/dist/blam/common/cache/index.js +1 -0
  26. package/dist/blam/common/cache/security_functions.d.ts +2 -0
  27. package/dist/blam/common/cache/security_functions.d.ts.map +1 -0
  28. package/dist/blam/common/cache/security_functions.js +19 -0
  29. package/dist/blam/common/index.d.ts +3 -0
  30. package/dist/blam/common/index.d.ts.map +1 -0
  31. package/dist/blam/common/index.js +2 -0
  32. package/dist/blam/common/memory/data_compress.d.ts +10 -0
  33. package/dist/blam/common/memory/data_compress.d.ts.map +1 -0
  34. package/dist/blam/common/memory/data_compress.js +28 -0
  35. package/dist/blam/common/memory/index.d.ts +2 -0
  36. package/dist/blam/common/memory/index.d.ts.map +1 -0
  37. package/dist/blam/common/memory/index.js +1 -0
  38. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant.d.ts +37 -0
  39. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant.d.ts.map +1 -0
  40. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant.js +125 -0
  41. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant_au1_settings.d.ts +14 -0
  42. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant_au1_settings.d.ts.map +1 -0
  43. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant_au1_settings.js +30 -0
  44. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_default.d.ts +114 -0
  45. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_default.d.ts.map +1 -0
  46. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_default.js +292 -0
  47. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_survival_variant.d.ts +70 -0
  48. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_survival_variant.d.ts.map +1 -0
  49. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_survival_variant.js +174 -0
  50. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_traits.d.ts +10 -0
  51. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_traits.d.ts.map +1 -0
  52. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_traits.js +16 -0
  53. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_variant.d.ts +28 -0
  54. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_variant.d.ts.map +1 -0
  55. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_variant.js +109 -0
  56. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_player_traits.d.ts +56 -0
  57. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_player_traits.d.ts.map +1 -0
  58. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_player_traits.js +142 -0
  59. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_string_table.d.ts +27 -0
  60. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_string_table.d.ts.map +1 -0
  61. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_string_table.js +190 -0
  62. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/index.d.ts +10 -0
  63. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/index.d.ts.map +1 -0
  64. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/index.js +9 -0
  65. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalo_game_statistic.d.ts +10 -0
  66. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalo_game_statistic.d.ts.map +1 -0
  67. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalo_game_statistic.js +18 -0
  68. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalogamengine_map_permissions.d.ts +8 -0
  69. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalogamengine_map_permissions.d.ts.map +1 -0
  70. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalogamengine_map_permissions.js +18 -0
  71. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_object_filter.d.ts +13 -0
  72. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_object_filter.d.ts.map +1 -0
  73. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_object_filter.js +39 -0
  74. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_trigger.d.ts +34 -0
  75. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_trigger.d.ts.map +1 -0
  76. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_trigger.js +59 -0
  77. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/index.d.ts +14 -0
  78. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/index.d.ts.map +1 -0
  79. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/index.js +13 -0
  80. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_actions.d.ts +393 -0
  81. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_actions.d.ts.map +1 -0
  82. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_actions.js +1590 -0
  83. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_conditions.d.ts +49 -0
  84. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_conditions.d.ts.map +1 -0
  85. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_conditions.js +216 -0
  86. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_references.d.ts +79 -0
  87. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_references.d.ts.map +1 -0
  88. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_references.js +496 -0
  89. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_text.d.ts +26 -0
  90. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_text.d.ts.map +1 -0
  91. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_text.js +118 -0
  92. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_custom_game_engine_definition.d.ts +29 -0
  93. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_custom_game_engine_definition.d.ts.map +1 -0
  94. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_custom_game_engine_definition.js +116 -0
  95. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_game_engine_player_rating_parameters.d.ts +22 -0
  96. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_game_engine_player_rating_parameters.d.ts.map +1 -0
  97. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_game_engine_player_rating_parameters.js +54 -0
  98. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_user_defined_option.d.ts +22 -0
  99. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_user_defined_option.d.ts.map +1 -0
  100. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_user_defined_option.js +82 -0
  101. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variable_metadata.d.ts +22 -0
  102. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variable_metadata.d.ts.map +1 -0
  103. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variable_metadata.js +85 -0
  104. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variant_variable.d.ts +13 -0
  105. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variant_variable.d.ts.map +1 -0
  106. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variant_variable.js +75 -0
  107. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/index.d.ts +4 -0
  108. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/index.d.ts.map +1 -0
  109. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/index.js +3 -0
  110. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/index.d.ts +2 -0
  111. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/index.d.ts.map +1 -0
  112. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/index.js +1 -0
  113. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/saved_game_files.d.ts +66 -0
  114. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/saved_game_files.d.ts.map +1 -0
  115. package/dist/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/saved_game_files.js +586 -0
  116. package/dist/blf_chunk.d.ts +41 -0
  117. package/dist/blf_chunk.d.ts.map +1 -0
  118. package/dist/blf_chunk.js +126 -0
  119. package/dist/blffile.d.ts +5 -0
  120. package/dist/blffile.d.ts.map +1 -0
  121. package/dist/blffile.js +23 -0
  122. package/dist/chunk_signature.d.ts +10 -0
  123. package/dist/chunk_signature.d.ts.map +1 -0
  124. package/dist/chunk_signature.js +47 -0
  125. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/index.d.ts +4 -0
  126. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/index.d.ts.map +1 -0
  127. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/index.js +3 -0
  128. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_compressed_data.d.ts +21 -0
  129. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_compressed_data.d.ts.map +1 -0
  130. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_compressed_data.js +112 -0
  131. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_end_of_file.d.ts +7 -0
  132. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_end_of_file.d.ts.map +1 -0
  133. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_end_of_file.js +72 -0
  134. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_start_of_file.d.ts +13 -0
  135. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_start_of_file.d.ts.map +1 -0
  136. package/dist/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_start_of_file.js +83 -0
  137. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/index.d.ts +7 -0
  138. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/index.d.ts.map +1 -0
  139. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/index.js +6 -0
  140. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_author.d.ts +26 -0
  141. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_author.d.ts.map +1 -0
  142. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_author.js +109 -0
  143. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_compressed_data.d.ts +4 -0
  144. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_compressed_data.d.ts.map +1 -0
  145. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_compressed_data.js +3 -0
  146. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_content_header.d.ts +8 -0
  147. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_content_header.d.ts.map +1 -0
  148. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_content_header.js +78 -0
  149. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_game_variant.d.ts +24 -0
  150. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_game_variant.d.ts.map +1 -0
  151. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_game_variant.js +130 -0
  152. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_packed_game_variant.d.ts +15 -0
  153. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_packed_game_variant.d.ts.map +1 -0
  154. package/dist/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_packed_game_variant.js +85 -0
  155. package/dist/decorators.d.ts +38 -0
  156. package/dist/decorators.d.ts.map +1 -0
  157. package/dist/decorators.js +68 -0
  158. package/dist/error.d.ts +4 -0
  159. package/dist/error.d.ts.map +1 -0
  160. package/dist/error.js +6 -0
  161. package/dist/index.d.ts +7 -0
  162. package/dist/index.d.ts.map +1 -0
  163. package/dist/index.js +6 -0
  164. package/dist/s_blf_header.d.ts +14 -0
  165. package/dist/s_blf_header.d.ts.map +1 -0
  166. package/dist/s_blf_header.js +113 -0
  167. package/dist/versions/halo3/v12070_08_09_05_2031_halo3_ship.d.ts +5 -0
  168. package/dist/versions/halo3/v12070_08_09_05_2031_halo3_ship.d.ts.map +1 -0
  169. package/dist/versions/halo3/v12070_08_09_05_2031_halo3_ship.js +4 -0
  170. package/dist/versions/halo3odst/v13895_09_04_27_2201_atlas_release.d.ts +5 -0
  171. package/dist/versions/halo3odst/v13895_09_04_27_2201_atlas_release.d.ts.map +1 -0
  172. package/dist/versions/halo3odst/v13895_09_04_27_2201_atlas_release.js +4 -0
  173. package/dist/versions/haloreach/v12065_11_08_24_1738_tu1actual.d.ts +10 -0
  174. package/dist/versions/haloreach/v12065_11_08_24_1738_tu1actual.d.ts.map +1 -0
  175. package/dist/versions/haloreach/v12065_11_08_24_1738_tu1actual.js +9 -0
  176. package/dist-cjs/bitstream/enum.js +19 -0
  177. package/dist-cjs/bitstream/enums.js +34 -0
  178. package/dist-cjs/bitstream/errors.js +16 -0
  179. package/dist-cjs/bitstream/index.js +29 -0
  180. package/dist-cjs/bitstream/math.js +167 -0
  181. package/dist-cjs/bitstream/reader.js +404 -0
  182. package/dist-cjs/bitstream/writer.js +334 -0
  183. package/dist-cjs/blam/common/cache/index.js +17 -0
  184. package/dist-cjs/blam/common/cache/security_functions.js +22 -0
  185. package/dist-cjs/blam/common/index.js +18 -0
  186. package/dist-cjs/blam/common/memory/data_compress.js +33 -0
  187. package/dist-cjs/blam/common/memory/index.js +17 -0
  188. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant.js +129 -0
  189. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_custom_variant_au1_settings.js +34 -0
  190. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_default.js +305 -0
  191. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_survival_variant.js +182 -0
  192. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_engine_traits.js +20 -0
  193. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_game_variant.js +113 -0
  194. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_player_traits.js +151 -0
  195. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/c_string_table.js +195 -0
  196. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/index.js +25 -0
  197. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalo_game_statistic.js +22 -0
  198. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_megalogamengine_map_permissions.js +22 -0
  199. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_object_filter.js +43 -0
  200. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/c_trigger.js +63 -0
  201. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/index.js +29 -0
  202. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_actions.js +1640 -0
  203. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_conditions.js +224 -0
  204. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_references.js +508 -0
  205. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/megalogamengine_text.js +124 -0
  206. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_custom_game_engine_definition.js +120 -0
  207. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_game_engine_player_rating_parameters.js +58 -0
  208. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_user_defined_option.js +87 -0
  209. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variable_metadata.js +93 -0
  210. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/game/megalogamengine/s_variant_variable.js +79 -0
  211. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/index.js +19 -0
  212. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/index.js +17 -0
  213. package/dist-cjs/blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/saved_game_files.js +591 -0
  214. package/dist-cjs/blf_chunk.js +139 -0
  215. package/dist-cjs/blffile.js +26 -0
  216. package/dist-cjs/chunk_signature.js +52 -0
  217. package/dist-cjs/chunks/halo3/v12070_08_09_05_2031_halo3_ship/index.js +10 -0
  218. package/dist-cjs/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_compressed_data.js +115 -0
  219. package/dist-cjs/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_end_of_file.js +75 -0
  220. package/dist-cjs/chunks/halo3/v12070_08_09_05_2031_halo3_ship/s_blf_chunk_start_of_file.js +86 -0
  221. package/dist-cjs/chunks/haloreach/v12065_11_08_24_1738_tu1actual/index.js +23 -0
  222. package/dist-cjs/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_author.js +115 -0
  223. package/dist-cjs/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_compressed_data.js +10 -0
  224. package/dist-cjs/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_content_header.js +81 -0
  225. package/dist-cjs/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_game_variant.js +133 -0
  226. package/dist-cjs/chunks/haloreach/v12065_11_08_24_1738_tu1actual/s_blf_chunk_packed_game_variant.js +88 -0
  227. package/dist-cjs/decorators.js +75 -0
  228. package/dist-cjs/error.js +10 -0
  229. package/dist-cjs/index.js +53 -0
  230. package/dist-cjs/package.json +1 -0
  231. package/dist-cjs/s_blf_header.js +117 -0
  232. package/dist-cjs/versions/halo3/v12070_08_09_05_2031_halo3_ship.js +20 -0
  233. package/dist-cjs/versions/halo3odst/v13895_09_04_27_2201_atlas_release.js +20 -0
  234. package/dist-cjs/versions/haloreach/v12065_11_08_24_1738_tu1actual.js +25 -0
  235. package/package.json +99 -0
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CStructBLFChunk = exports.BLFChunkBase = exports.s_blf_header = exports.parse_blf_chunk_version = exports.getBlfChunkMeta = exports.createBlfChunk = exports.chunk = exports.blf = exports.BLF_CHUNK_META = void 0;
4
+ exports.find_chunk = find_chunk;
5
+ exports.search_for_chunk = search_for_chunk;
6
+ const cstruct_1 = require("@craftycodie/cstruct");
7
+ const decorators_1 = require("./decorators");
8
+ const error_1 = require("./error");
9
+ const s_blf_header_1 = require("./s_blf_header");
10
+ Object.defineProperty(exports, "parse_blf_chunk_version", { enumerable: true, get: function () { return s_blf_header_1.parse_blf_chunk_version; } });
11
+ Object.defineProperty(exports, "s_blf_header", { enumerable: true, get: function () { return s_blf_header_1.s_blf_header; } });
12
+ var decorators_2 = require("./decorators");
13
+ Object.defineProperty(exports, "BLF_CHUNK_META", { enumerable: true, get: function () { return decorators_2.BLF_CHUNK_META; } });
14
+ Object.defineProperty(exports, "blf", { enumerable: true, get: function () { return decorators_2.blf; } });
15
+ Object.defineProperty(exports, "chunk", { enumerable: true, get: function () { return decorators_2.chunk; } });
16
+ Object.defineProperty(exports, "createBlfChunk", { enumerable: true, get: function () { return decorators_2.createBlfChunk; } });
17
+ Object.defineProperty(exports, "getBlfChunkMeta", { enumerable: true, get: function () { return decorators_2.getBlfChunkMeta; } });
18
+ /** Default {@link BLFChunk.read} / {@link BLFChunk.write}. */
19
+ class BLFChunkBase {
20
+ read(bytes, endian) {
21
+ const header = cstruct_1.c.read(s_blf_header_1.s_blf_header, bytes.subarray(0, cstruct_1.c.size(s_blf_header_1.s_blf_header)), endian);
22
+ const meta = (0, decorators_1.getBlfChunkMeta)(this);
23
+ if (header.signature !== meta.signature ||
24
+ header.major !== meta.major ||
25
+ header.minor !== meta.minor) {
26
+ throw new error_1.BlfError(`BLF chunk header mismatch: expected ${meta.signature} ${meta.major}.${meta.minor}, got ${header.signature} ${header.major}.${header.minor}`);
27
+ }
28
+ if (bytes.length < header.chunk_length) {
29
+ throw new error_1.BlfError(`BLF chunk buffer too short: chunk_length ${header.chunk_length}, got ${bytes.length}`);
30
+ }
31
+ const payload = bytes.subarray(cstruct_1.c.size(s_blf_header_1.s_blf_header), header.chunk_length);
32
+ this.read_body(payload, endian);
33
+ }
34
+ write(endian) {
35
+ const body = this.write_body(endian);
36
+ const { signature, major, minor } = (0, decorators_1.getBlfChunkMeta)(this);
37
+ const header_bytes = cstruct_1.c.write(s_blf_header_1.s_blf_header, s_blf_header_1.s_blf_header.create(signature, body.length + cstruct_1.c.size(s_blf_header_1.s_blf_header), major, minor), endian);
38
+ const out = new Uint8Array(header_bytes.length + body.length);
39
+ out.set(header_bytes, 0);
40
+ out.set(body, header_bytes.length);
41
+ return out;
42
+ }
43
+ }
44
+ exports.BLFChunkBase = BLFChunkBase;
45
+ /**
46
+ * Default {@link BLFChunk} read/write for classes decorated with `@c.struct`.
47
+ * Apply `@blf.chunk` above `@c.struct` and extend this base class.
48
+ */
49
+ class CStructBLFChunk extends BLFChunkBase {
50
+ read_body(payload, endian) {
51
+ const ctor = this.constructor;
52
+ const info = this;
53
+ const size = cstruct_1.c.size(ctor);
54
+ if (payload.length < size) {
55
+ throw new error_1.BlfError(`Cannot read ${info.signature} chunk: need at least ${size} bytes, got ${payload.length}`);
56
+ }
57
+ Object.assign(this, cstruct_1.c.read(ctor, payload, endian));
58
+ }
59
+ write_body(endian) {
60
+ const ctor = this.constructor;
61
+ return cstruct_1.c.write(ctor, this, endian);
62
+ }
63
+ }
64
+ exports.CStructBLFChunk = CStructBLFChunk;
65
+ function tryReadHeader(buffer, byte_offset, endian) {
66
+ if (byte_offset + cstruct_1.c.size(s_blf_header_1.s_blf_header) > buffer.length) {
67
+ return null;
68
+ }
69
+ try {
70
+ return cstruct_1.c.read(s_blf_header_1.s_blf_header, buffer.subarray(byte_offset, byte_offset + cstruct_1.c.size(s_blf_header_1.s_blf_header)), endian);
71
+ }
72
+ catch {
73
+ return null;
74
+ }
75
+ }
76
+ function isChunkLengthValid(chunk_length, byte_offset, buffer_length) {
77
+ return (Number.isInteger(chunk_length) &&
78
+ chunk_length >= cstruct_1.c.size(s_blf_header_1.s_blf_header) &&
79
+ byte_offset + chunk_length <= buffer_length);
80
+ }
81
+ function loadChunkAt(buffer, byte_offset, header, chunk, endian) {
82
+ const chunk_end = byte_offset + header.chunk_length;
83
+ const payload = buffer.subarray(byte_offset + cstruct_1.c.size(s_blf_header_1.s_blf_header), chunk_end);
84
+ chunk.read_body(payload, endian);
85
+ }
86
+ /** Walk a BLF file sequentially until `chunk` is found, then read it in place. */
87
+ function find_chunk(buffer, chunk, endian) {
88
+ const meta = (0, decorators_1.getBlfChunkMeta)(chunk);
89
+ let offset = 0;
90
+ while (offset + cstruct_1.c.size(s_blf_header_1.s_blf_header) <= buffer.length) {
91
+ let header;
92
+ try {
93
+ header = cstruct_1.c.read(s_blf_header_1.s_blf_header, buffer.subarray(offset, offset + cstruct_1.c.size(s_blf_header_1.s_blf_header)), endian);
94
+ }
95
+ catch {
96
+ return false;
97
+ }
98
+ if ((0, decorators_1.chunkMatches)(header, meta)) {
99
+ if (!isChunkLengthValid(header.chunk_length, offset, buffer.length)) {
100
+ throw new error_1.BlfError(`Matched chunk "${header.signature}" at offset ${offset} has invalid chunk_length ${header.chunk_length}`);
101
+ }
102
+ loadChunkAt(buffer, offset, header, chunk, endian);
103
+ return true;
104
+ }
105
+ if (!isChunkLengthValid(header.chunk_length, offset, buffer.length)) {
106
+ return false;
107
+ }
108
+ offset += header.chunk_length;
109
+ }
110
+ return false;
111
+ }
112
+ /** Scan every byte offset for `chunk`, then read it in place when found. */
113
+ function search_for_chunk(buffer, chunk, endian) {
114
+ const meta = (0, decorators_1.getBlfChunkMeta)(chunk);
115
+ const last_offset = buffer.length - cstruct_1.c.size(s_blf_header_1.s_blf_header);
116
+ const sig = meta.signature;
117
+ const sig0 = endian === "little" ? sig.charCodeAt(3) : sig.charCodeAt(0);
118
+ const sig1 = endian === "little" ? sig.charCodeAt(2) : sig.charCodeAt(1);
119
+ const sig2 = endian === "little" ? sig.charCodeAt(1) : sig.charCodeAt(2);
120
+ const sig3 = endian === "little" ? sig.charCodeAt(0) : sig.charCodeAt(3);
121
+ for (let offset = 0; offset <= last_offset; offset++) {
122
+ if (buffer[offset] !== sig0 ||
123
+ buffer[offset + 1] !== sig1 ||
124
+ buffer[offset + 2] !== sig2 ||
125
+ buffer[offset + 3] !== sig3) {
126
+ continue;
127
+ }
128
+ const header = tryReadHeader(buffer, offset, endian);
129
+ if (header === null || !(0, decorators_1.chunkMatches)(header, meta)) {
130
+ continue;
131
+ }
132
+ if (!isChunkLengthValid(header.chunk_length, offset, buffer.length)) {
133
+ continue;
134
+ }
135
+ loadChunkAt(buffer, offset, header, chunk, endian);
136
+ return true;
137
+ }
138
+ return false;
139
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.write_blffile = write_blffile;
4
+ const blf_chunk_1 = require("./blf_chunk");
5
+ /** Concatenate chunks (each with a 12-byte BLF header) in order. */
6
+ function write_blffile(endian, chunks) {
7
+ const parts = [];
8
+ let offset = 0;
9
+ for (const chunk of chunks) {
10
+ if ((0, blf_chunk_1.getBlfChunkMeta)(chunk).signature === "_eof" &&
11
+ Object.getOwnPropertyNames(chunk).includes("file_size") &&
12
+ typeof chunk.file_size === "number") {
13
+ chunk.file_size = offset;
14
+ }
15
+ const bytes = chunk.write(endian);
16
+ parts.push(bytes);
17
+ offset += bytes.length;
18
+ }
19
+ const out = new Uint8Array(offset);
20
+ let write_offset = 0;
21
+ for (const part of parts) {
22
+ out.set(part, write_offset);
23
+ write_offset += part.length;
24
+ }
25
+ return out;
26
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChunkSignature = void 0;
4
+ exports.chunkSignature = chunkSignature;
5
+ const cstruct_1 = require("@craftycodie/cstruct");
6
+ const error_1 = require("./error");
7
+ /** Fixed 4-byte BLF chunk signature; reverses byte order on little-endian. */
8
+ class ChunkSignature extends cstruct_1.c.AdvancedType {
9
+ byteSize = 4;
10
+ read(bytes, offset, endian, _label) {
11
+ if (offset + this.byteSize > bytes.length) {
12
+ throw new error_1.BlfError(`Cannot read chunk signature: need ${this.byteSize} bytes at offset ${offset}, have ${bytes.length - offset}`);
13
+ }
14
+ const w0 = bytes[offset];
15
+ const w1 = bytes[offset + 1];
16
+ const w2 = bytes[offset + 2];
17
+ const w3 = bytes[offset + 3];
18
+ if (endian === "little") {
19
+ return String.fromCharCode(w3, w2, w1, w0);
20
+ }
21
+ return String.fromCharCode(w0, w1, w2, w3);
22
+ }
23
+ write(bytes, offset, value, endian, _label) {
24
+ if (value.length !== this.byteSize) {
25
+ throw new error_1.BlfError(`BLF chunk signature must be exactly 4 characters, got ${value.length}: "${value}"`);
26
+ }
27
+ if (offset + this.byteSize > bytes.length) {
28
+ throw new error_1.BlfError(`Cannot write chunk signature: need ${this.byteSize} bytes at offset ${offset}, have ${bytes.length - offset}`);
29
+ }
30
+ const a = value.charCodeAt(0);
31
+ const b = value.charCodeAt(1);
32
+ const c0 = value.charCodeAt(2);
33
+ const d = value.charCodeAt(3);
34
+ if (endian === "little") {
35
+ bytes[offset] = d;
36
+ bytes[offset + 1] = c0;
37
+ bytes[offset + 2] = b;
38
+ bytes[offset + 3] = a;
39
+ }
40
+ else {
41
+ bytes[offset] = a;
42
+ bytes[offset + 1] = b;
43
+ bytes[offset + 2] = c0;
44
+ bytes[offset + 3] = d;
45
+ }
46
+ }
47
+ }
48
+ exports.ChunkSignature = ChunkSignature;
49
+ /** BLF chunk signature field for `@c.field`. */
50
+ function chunkSignature() {
51
+ return new ChunkSignature();
52
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.s_blf_chunk_start_of_file = exports.e_byte_order_mark = exports.s_blf_chunk_end_of_file = exports.s_blf_chunk_compressed_data = void 0;
4
+ var s_blf_chunk_compressed_data_1 = require("./s_blf_chunk_compressed_data");
5
+ Object.defineProperty(exports, "s_blf_chunk_compressed_data", { enumerable: true, get: function () { return s_blf_chunk_compressed_data_1.s_blf_chunk_compressed_data; } });
6
+ var s_blf_chunk_end_of_file_1 = require("./s_blf_chunk_end_of_file");
7
+ Object.defineProperty(exports, "s_blf_chunk_end_of_file", { enumerable: true, get: function () { return s_blf_chunk_end_of_file_1.s_blf_chunk_end_of_file; } });
8
+ var s_blf_chunk_start_of_file_1 = require("./s_blf_chunk_start_of_file");
9
+ Object.defineProperty(exports, "e_byte_order_mark", { enumerable: true, get: function () { return s_blf_chunk_start_of_file_1.e_byte_order_mark; } });
10
+ Object.defineProperty(exports, "s_blf_chunk_start_of_file", { enumerable: true, get: function () { return s_blf_chunk_start_of_file_1.s_blf_chunk_start_of_file; } });
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
+ var _, done = false;
8
+ for (var i = decorators.length - 1; i >= 0; i--) {
9
+ var context = {};
10
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
+ if (kind === "accessor") {
15
+ if (result === void 0) continue;
16
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
+ if (_ = accept(result.get)) descriptor.get = _;
18
+ if (_ = accept(result.set)) descriptor.set = _;
19
+ if (_ = accept(result.init)) initializers.unshift(_);
20
+ }
21
+ else if (_ = accept(result)) {
22
+ if (kind === "field") initializers.unshift(_);
23
+ else descriptor[key] = _;
24
+ }
25
+ }
26
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
+ done = true;
28
+ };
29
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
+ var useValue = arguments.length > 2;
31
+ for (var i = 0; i < initializers.length; i++) {
32
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
+ }
34
+ return useValue ? value : void 0;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.s_blf_chunk_compressed_data = void 0;
38
+ const pako_1 = require("pako");
39
+ const data_compress_1 = require("../../../blam/common/memory/data_compress");
40
+ const blf_chunk_1 = require("../../../blf_chunk");
41
+ const error_1 = require("../../../error");
42
+ /**
43
+ * Halo 3 `_cmp` (1.1): zlib-compressed wrapper around another BLF chunk.
44
+ *
45
+ * Payload layout (big-endian): `u8 compression_type`, `u32 uncompressed_size`,
46
+ * zlib bytes (RFC 1950). Uncompressed data is a full inner BLF chunk (12-byte
47
+ * header + payload).
48
+ */
49
+ let s_blf_chunk_compressed_data = (() => {
50
+ let _classDecorators = [blf_chunk_1.blf.chunk("_cmp", 1.1)];
51
+ let _classDescriptor;
52
+ let _classExtraInitializers = [];
53
+ let _classThis;
54
+ let _classSuper = blf_chunk_1.BLFChunkBase;
55
+ var s_blf_chunk_compressed_data = class extends _classSuper {
56
+ static { _classThis = this; }
57
+ static {
58
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
59
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
60
+ s_blf_chunk_compressed_data = _classThis = _classDescriptor.value;
61
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
62
+ __runInitializers(_classThis, _classExtraInitializers);
63
+ }
64
+ InnerCtor;
65
+ compression_type = 0;
66
+ chunk;
67
+ constructor(InnerCtor, chunk) {
68
+ super();
69
+ this.InnerCtor = InnerCtor;
70
+ this.chunk = chunk ?? (0, blf_chunk_1.createBlfChunk)(InnerCtor);
71
+ }
72
+ static create(InnerCtor, chunk) {
73
+ const wrapper = new s_blf_chunk_compressed_data(InnerCtor, chunk);
74
+ wrapper.compression_type = 0;
75
+ return wrapper;
76
+ }
77
+ /** Decompress `_cmp` body bytes (type + BE size + zlib) without parsing the inner chunk. */
78
+ static decompress_payload(payload) {
79
+ if (payload.length < 5) {
80
+ throw new error_1.BlfError(`_cmp payload needs at least 5 bytes, got ${payload.length}`);
81
+ }
82
+ const uncompressed_size = new DataView(payload.buffer, payload.byteOffset).getUint32(1, false);
83
+ const compressed = payload.subarray(5);
84
+ const uncompressed = (0, pako_1.inflate)(compressed);
85
+ if (uncompressed.length !== uncompressed_size) {
86
+ throw new error_1.BlfError(`_cmp zlib decompressed ${uncompressed.length} bytes, expected ${uncompressed_size}`);
87
+ }
88
+ return uncompressed;
89
+ }
90
+ read_body(payload, endian) {
91
+ if (payload.length < 5) {
92
+ throw new error_1.BlfError(`_cmp payload needs at least 5 bytes, got ${payload.length}`);
93
+ }
94
+ this.compression_type = payload[0];
95
+ const uncompressed = s_blf_chunk_compressed_data.decompress_payload(payload);
96
+ const chunk = (0, blf_chunk_1.createBlfChunk)(this.InnerCtor);
97
+ if (!(0, blf_chunk_1.find_chunk)(uncompressed, chunk, endian)) {
98
+ const expected = (0, blf_chunk_1.getBlfChunkMeta)(this.InnerCtor);
99
+ throw new error_1.BlfError(`Unexpected compressed chunk: expected ${expected.signature} ${expected.major}.${expected.minor} not found in decompressed body`);
100
+ }
101
+ this.chunk = chunk;
102
+ }
103
+ write_body(endian) {
104
+ const inner_bytes = this.chunk.write(endian);
105
+ const compressed = (0, data_compress_1.zlib_compress)(inner_bytes);
106
+ const payload = new Uint8Array(1 + 4 + compressed.length);
107
+ payload[0] = this.compression_type;
108
+ new DataView(payload.buffer).setUint32(1, inner_bytes.length, false);
109
+ payload.set(compressed, 5);
110
+ return payload;
111
+ }
112
+ };
113
+ return s_blf_chunk_compressed_data = _classThis;
114
+ })();
115
+ exports.s_blf_chunk_compressed_data = s_blf_chunk_compressed_data;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
+ var _, done = false;
8
+ for (var i = decorators.length - 1; i >= 0; i--) {
9
+ var context = {};
10
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
+ if (kind === "accessor") {
15
+ if (result === void 0) continue;
16
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
+ if (_ = accept(result.get)) descriptor.get = _;
18
+ if (_ = accept(result.set)) descriptor.set = _;
19
+ if (_ = accept(result.init)) initializers.unshift(_);
20
+ }
21
+ else if (_ = accept(result)) {
22
+ if (kind === "field") initializers.unshift(_);
23
+ else descriptor[key] = _;
24
+ }
25
+ }
26
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
+ done = true;
28
+ };
29
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
+ var useValue = arguments.length > 2;
31
+ for (var i = 0; i < initializers.length; i++) {
32
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
+ }
34
+ return useValue ? value : void 0;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.s_blf_chunk_end_of_file = void 0;
38
+ const cstruct_1 = require("@craftycodie/cstruct");
39
+ const blf_chunk_1 = require("../../../blf_chunk");
40
+ /** BLF end-of-file chunk (`_eof` 1.1). `file_size` is bytes written before this chunk. */
41
+ let s_blf_chunk_end_of_file = (() => {
42
+ let _classDecorators = [blf_chunk_1.blf.chunk("_eof", 1.1), cstruct_1.c.struct()];
43
+ let _classDescriptor;
44
+ let _classExtraInitializers = [];
45
+ let _classThis;
46
+ let _classSuper = blf_chunk_1.CStructBLFChunk;
47
+ let _file_size_decorators;
48
+ let _file_size_initializers = [];
49
+ let _file_size_extraInitializers = [];
50
+ let _authentication_type_decorators;
51
+ let _authentication_type_initializers = [];
52
+ let _authentication_type_extraInitializers = [];
53
+ var s_blf_chunk_end_of_file = class extends _classSuper {
54
+ static { _classThis = this; }
55
+ static {
56
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
57
+ _file_size_decorators = [cstruct_1.c.field("u32")];
58
+ _authentication_type_decorators = [cstruct_1.c.field("u8")];
59
+ __esDecorate(null, null, _file_size_decorators, { kind: "field", name: "file_size", static: false, private: false, access: { has: obj => "file_size" in obj, get: obj => obj.file_size, set: (obj, value) => { obj.file_size = value; } }, metadata: _metadata }, _file_size_initializers, _file_size_extraInitializers);
60
+ __esDecorate(null, null, _authentication_type_decorators, { kind: "field", name: "authentication_type", static: false, private: false, access: { has: obj => "authentication_type" in obj, get: obj => obj.authentication_type, set: (obj, value) => { obj.authentication_type = value; } }, metadata: _metadata }, _authentication_type_initializers, _authentication_type_extraInitializers);
61
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
62
+ s_blf_chunk_end_of_file = _classThis = _classDescriptor.value;
63
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
64
+ __runInitializers(_classThis, _classExtraInitializers);
65
+ }
66
+ file_size = __runInitializers(this, _file_size_initializers, 0);
67
+ authentication_type = (__runInitializers(this, _file_size_extraInitializers), __runInitializers(this, _authentication_type_initializers, 0));
68
+ constructor() {
69
+ super(...arguments);
70
+ __runInitializers(this, _authentication_type_extraInitializers);
71
+ }
72
+ };
73
+ return s_blf_chunk_end_of_file = _classThis;
74
+ })();
75
+ exports.s_blf_chunk_end_of_file = s_blf_chunk_end_of_file;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
+ var _, done = false;
8
+ for (var i = decorators.length - 1; i >= 0; i--) {
9
+ var context = {};
10
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
+ if (kind === "accessor") {
15
+ if (result === void 0) continue;
16
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
+ if (_ = accept(result.get)) descriptor.get = _;
18
+ if (_ = accept(result.set)) descriptor.set = _;
19
+ if (_ = accept(result.init)) initializers.unshift(_);
20
+ }
21
+ else if (_ = accept(result)) {
22
+ if (kind === "field") initializers.unshift(_);
23
+ else descriptor[key] = _;
24
+ }
25
+ }
26
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
+ done = true;
28
+ };
29
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
+ var useValue = arguments.length > 2;
31
+ for (var i = 0; i < initializers.length; i++) {
32
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
+ }
34
+ return useValue ? value : void 0;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.s_blf_chunk_start_of_file = exports.e_byte_order_mark = void 0;
38
+ const cstruct_1 = require("@craftycodie/cstruct");
39
+ const blf_chunk_1 = require("../../../blf_chunk");
40
+ /** Wire values for {@link s_blf_chunk_start_of_file.byte_order_mark}. */
41
+ var e_byte_order_mark;
42
+ (function (e_byte_order_mark) {
43
+ e_byte_order_mark[e_byte_order_mark["little_endian"] = 65534] = "little_endian";
44
+ e_byte_order_mark[e_byte_order_mark["big_endian"] = 65279] = "big_endian";
45
+ })(e_byte_order_mark || (exports.e_byte_order_mark = e_byte_order_mark = {}));
46
+ /** BLF start-of-file chunk (`_blf` 1.2). */
47
+ let s_blf_chunk_start_of_file = (() => {
48
+ let _classDecorators = [blf_chunk_1.blf.chunk("_blf", 1.2), cstruct_1.c.struct()];
49
+ let _classDescriptor;
50
+ let _classExtraInitializers = [];
51
+ let _classThis;
52
+ let _classSuper = blf_chunk_1.CStructBLFChunk;
53
+ let _byte_order_mark_decorators;
54
+ let _byte_order_mark_initializers = [];
55
+ let _byte_order_mark_extraInitializers = [];
56
+ let _name_decorators;
57
+ let _name_initializers = [];
58
+ let _name_extraInitializers = [];
59
+ var s_blf_chunk_start_of_file = class extends _classSuper {
60
+ static { _classThis = this; }
61
+ static {
62
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
63
+ _byte_order_mark_decorators = [cstruct_1.c.field(cstruct_1.c.enum("u16", e_byte_order_mark))];
64
+ _name_decorators = [cstruct_1.c.field(cstruct_1.c.String(32), { pad_before: 2 })];
65
+ __esDecorate(null, null, _byte_order_mark_decorators, { kind: "field", name: "byte_order_mark", static: false, private: false, access: { has: obj => "byte_order_mark" in obj, get: obj => obj.byte_order_mark, set: (obj, value) => { obj.byte_order_mark = value; } }, metadata: _metadata }, _byte_order_mark_initializers, _byte_order_mark_extraInitializers);
66
+ __esDecorate(null, null, _name_decorators, { kind: "field", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
67
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
68
+ s_blf_chunk_start_of_file = _classThis = _classDescriptor.value;
69
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
70
+ __runInitializers(_classThis, _classExtraInitializers);
71
+ }
72
+ byte_order_mark = __runInitializers(this, _byte_order_mark_initializers, e_byte_order_mark.little_endian);
73
+ name = (__runInitializers(this, _byte_order_mark_extraInitializers), __runInitializers(this, _name_initializers, ""));
74
+ static create(name) {
75
+ const chunk = new s_blf_chunk_start_of_file();
76
+ chunk.name = name;
77
+ return chunk;
78
+ }
79
+ constructor() {
80
+ super(...arguments);
81
+ __runInitializers(this, _name_extraInitializers);
82
+ }
83
+ };
84
+ return s_blf_chunk_start_of_file = _classThis;
85
+ })();
86
+ exports.s_blf_chunk_start_of_file = s_blf_chunk_start_of_file;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.s_blf_chunk_matchmaking_game_variant = exports.s_blf_chunk_game_variant = exports.s_blf_chunk_content_header = exports.s_blf_chunk_author = exports.c_content_item_metadata = exports.s_content_item_matchmaking_metadata = exports.s_content_item_history = exports.s_content_item_general_metadata = exports.s_content_item_game_variant_metadata = exports.s_content_item_firefight_metadata = exports.s_content_item_film_metadata = exports.s_content_item_display_metadata = exports.s_content_item_campaign_metadata = exports.e_file_type = void 0;
4
+ /** Reach TU1 chunk implementations (import via `versions/` for a full build). */
5
+ var saved_game_files_1 = require("../../../blam/haloreach/v12065_11_08_24_1738_tu1actual/saved_games/saved_game_files");
6
+ Object.defineProperty(exports, "e_file_type", { enumerable: true, get: function () { return saved_game_files_1.e_file_type; } });
7
+ Object.defineProperty(exports, "s_content_item_campaign_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_campaign_metadata; } });
8
+ Object.defineProperty(exports, "s_content_item_display_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_display_metadata; } });
9
+ Object.defineProperty(exports, "s_content_item_film_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_film_metadata; } });
10
+ Object.defineProperty(exports, "s_content_item_firefight_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_firefight_metadata; } });
11
+ Object.defineProperty(exports, "s_content_item_game_variant_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_game_variant_metadata; } });
12
+ Object.defineProperty(exports, "s_content_item_general_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_general_metadata; } });
13
+ Object.defineProperty(exports, "s_content_item_history", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_history; } });
14
+ Object.defineProperty(exports, "s_content_item_matchmaking_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_matchmaking_metadata; } });
15
+ Object.defineProperty(exports, "c_content_item_metadata", { enumerable: true, get: function () { return saved_game_files_1.s_content_item_metadata; } });
16
+ var s_blf_chunk_author_1 = require("./s_blf_chunk_author");
17
+ Object.defineProperty(exports, "s_blf_chunk_author", { enumerable: true, get: function () { return s_blf_chunk_author_1.s_blf_chunk_author; } });
18
+ var s_blf_chunk_content_header_1 = require("./s_blf_chunk_content_header");
19
+ Object.defineProperty(exports, "s_blf_chunk_content_header", { enumerable: true, get: function () { return s_blf_chunk_content_header_1.s_blf_chunk_content_header; } });
20
+ var s_blf_chunk_game_variant_1 = require("./s_blf_chunk_game_variant");
21
+ Object.defineProperty(exports, "s_blf_chunk_game_variant", { enumerable: true, get: function () { return s_blf_chunk_game_variant_1.s_blf_chunk_game_variant; } });
22
+ var s_blf_chunk_packed_game_variant_1 = require("./s_blf_chunk_packed_game_variant");
23
+ Object.defineProperty(exports, "s_blf_chunk_matchmaking_game_variant", { enumerable: true, get: function () { return s_blf_chunk_packed_game_variant_1.s_blf_chunk_packed_game_variant; } });