stormlib 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (624) hide show
  1. checksums.yaml +4 -4
  2. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CMakeCCompiler.cmake +72 -0
  3. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake +83 -0
  4. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin +0 -0
  5. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin +0 -0
  6. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CMakeSystem.cmake +15 -0
  7. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CompilerIdC/CMakeCCompilerId.c +803 -0
  8. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CompilerIdC/a.out +0 -0
  9. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp +791 -0
  10. data/ext/stormlib/StormLib/CMakeFiles/3.22.1/CompilerIdCXX/a.out +0 -0
  11. data/ext/stormlib/StormLib/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  12. data/ext/stormlib/StormLib/CMakeFiles/CMakeOutput.log +478 -0
  13. data/ext/stormlib/StormLib/CMakeFiles/Export/share/StormLib/StormLibConfig-noconfig.cmake +19 -0
  14. data/ext/stormlib/StormLib/CMakeFiles/Export/share/StormLib/StormLibConfig.cmake +99 -0
  15. data/ext/stormlib/StormLib/CMakeFiles/Makefile.cmake +61 -0
  16. data/ext/stormlib/StormLib/CMakeFiles/Makefile2 +112 -0
  17. data/ext/stormlib/StormLib/CMakeFiles/TargetDirectories.txt +9 -0
  18. data/ext/stormlib/StormLib/CMakeFiles/cmake.check_cache +1 -0
  19. data/ext/stormlib/StormLib/CMakeFiles/progress.marks +1 -0
  20. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/DependInfo.cmake +243 -0
  21. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/build.make +3695 -0
  22. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/cmake_clean.cmake +459 -0
  23. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/cmake_clean_target.cmake +3 -0
  24. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/compiler_depend.make +2 -0
  25. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/compiler_depend.ts +2 -0
  26. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/depend.make +2 -0
  27. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/flags.make +17 -0
  28. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/link.txt +2 -0
  29. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/progress.make +227 -0
  30. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/FileStream.cpp.o.d +160 -0
  31. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SBaseCommon.cpp.o.d +159 -0
  32. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SBaseDumpData.cpp.o.d +159 -0
  33. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SBaseFileTable.cpp.o.d +159 -0
  34. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SBaseSubTypes.cpp.o.d +159 -0
  35. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SCompression.cpp.o.d +159 -0
  36. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileAddFile.cpp.o.d +159 -0
  37. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileAttributes.cpp.o.d +159 -0
  38. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileCompactArchive.cpp.o.d +159 -0
  39. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileCreateArchive.cpp.o.d +159 -0
  40. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileExtractFile.cpp.o.d +159 -0
  41. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileFindFile.cpp.o.d +159 -0
  42. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileGetFileInfo.cpp.o.d +159 -0
  43. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileListFile.cpp.o.d +159 -0
  44. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileOpenArchive.cpp.o.d +159 -0
  45. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileOpenFileEx.cpp.o.d +159 -0
  46. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFilePatchArchives.cpp.o.d +159 -0
  47. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileReadFile.cpp.o.d +159 -0
  48. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/SFileVerify.cpp.o.d +159 -0
  49. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/adpcm/adpcm.cpp.o.d +12 -0
  50. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/huffman/huff.cpp.o.d +16 -0
  51. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/jenkins/lookup3.c.o.d +88 -0
  52. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/hashes/hash_memory.c.o.d +102 -0
  53. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/hashes/md5.c.o.d +102 -0
  54. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/hashes/sha1.c.o.d +102 -0
  55. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/hashes/sha256.c.o.d +102 -0
  56. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/math/ltm_desc.c.o.d +105 -0
  57. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/math/multi.c.o.d +102 -0
  58. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/math/rand_prime.c.o.d +102 -0
  59. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/base64_decode.c.o.d +102 -0
  60. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_argchk.c.o.d +102 -0
  61. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_find_hash.c.o.d +102 -0
  62. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_find_prng.c.o.d +102 -0
  63. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_hash_descriptor.c.o.d +102 -0
  64. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_hash_is_valid.c.o.d +102 -0
  65. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_libc.c.o.d +102 -0
  66. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c.o.d +102 -0
  67. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_prng_descriptor.c.o.d +102 -0
  68. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_prng_is_valid.c.o.d +102 -0
  69. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_register_hash.c.o.d +102 -0
  70. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/crypt_register_prng.c.o.d +102 -0
  71. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/misc/zeromem.c.o.d +102 -0
  72. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c.o.d +102 -0
  73. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_boolean.c.o.d +102 -0
  74. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_choice.c.o.d +102 -0
  75. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c.o.d +102 -0
  76. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_integer.c.o.d +102 -0
  77. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c.o.d +102 -0
  78. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c.o.d +102 -0
  79. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c.o.d +102 -0
  80. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c.o.d +102 -0
  81. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c.o.d +102 -0
  82. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c.o.d +102 -0
  83. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c.o.d +102 -0
  84. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_utctime.c.o.d +102 -0
  85. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c.o.d +102 -0
  86. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_bit_string.c.o.d +102 -0
  87. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_boolean.c.o.d +102 -0
  88. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.c.o.d +102 -0
  89. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_integer.c.o.d +102 -0
  90. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.c.o.d +102 -0
  91. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_octet_string.c.o.d +102 -0
  92. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_printable_string.c.o.d +102 -0
  93. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.c.o.d +102 -0
  94. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.c.o.d +102 -0
  95. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_set.c.o.d +102 -0
  96. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_setof.c.o.d +102 -0
  97. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_short_integer.c.o.d +102 -0
  98. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_utctime.c.o.d +102 -0
  99. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.c.o.d +102 -0
  100. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_bit_string.c.o.d +102 -0
  101. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_boolean.c.o.d +102 -0
  102. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c.o.d +102 -0
  103. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_integer.c.o.d +102 -0
  104. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c.o.d +102 -0
  105. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_octet_string.c.o.d +102 -0
  106. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_printable_string.c.o.d +102 -0
  107. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_sequence.c.o.d +102 -0
  108. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_short_integer.c.o.d +102 -0
  109. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_utctime.c.o.d +102 -0
  110. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c.o.d +102 -0
  111. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/asn1/der_sequence_free.c.o.d +102 -0
  112. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c.o.d +102 -0
  113. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c.o.d +102 -0
  114. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c.o.d +102 -0
  115. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c.o.d +102 -0
  116. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c.o.d +102 -0
  117. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c.o.d +102 -0
  118. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c.o.d +102 -0
  119. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c.o.d +102 -0
  120. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c.o.d +102 -0
  121. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c.o.d +102 -0
  122. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c.o.d +102 -0
  123. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c.o.d +102 -0
  124. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_exptmod.c.o.d +102 -0
  125. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_free.c.o.d +102 -0
  126. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_import.c.o.d +102 -0
  127. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_make_key.c.o.d +102 -0
  128. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_sign_hash.c.o.d +102 -0
  129. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c.o.d +102 -0
  130. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c.o.d +102 -0
  131. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_fast_mp_invmod.c.o.d +65 -0
  132. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_fast_mp_montgomery_reduce.c.o.d +65 -0
  133. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_fast_s_mp_mul_digs.c.o.d +65 -0
  134. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_fast_s_mp_mul_high_digs.c.o.d +65 -0
  135. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_fast_s_mp_sqr.c.o.d +65 -0
  136. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_2expt.c.o.d +65 -0
  137. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_abs.c.o.d +65 -0
  138. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_add.c.o.d +65 -0
  139. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_add_d.c.o.d +65 -0
  140. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_addmod.c.o.d +65 -0
  141. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_and.c.o.d +65 -0
  142. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_clamp.c.o.d +65 -0
  143. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_clear.c.o.d +65 -0
  144. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_clear_multi.c.o.d +65 -0
  145. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_cmp.c.o.d +65 -0
  146. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_cmp_d.c.o.d +65 -0
  147. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_cmp_mag.c.o.d +65 -0
  148. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_cnt_lsb.c.o.d +65 -0
  149. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_copy.c.o.d +65 -0
  150. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_count_bits.c.o.d +65 -0
  151. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_div.c.o.d +65 -0
  152. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_div_2.c.o.d +65 -0
  153. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_div_2d.c.o.d +65 -0
  154. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_div_3.c.o.d +65 -0
  155. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_div_d.c.o.d +65 -0
  156. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_dr_is_modulus.c.o.d +65 -0
  157. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_dr_reduce.c.o.d +65 -0
  158. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_dr_setup.c.o.d +65 -0
  159. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_exch.c.o.d +65 -0
  160. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_expt_d.c.o.d +65 -0
  161. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_exptmod.c.o.d +65 -0
  162. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_exptmod_fast.c.o.d +65 -0
  163. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_exteuclid.c.o.d +65 -0
  164. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_fread.c.o.d +65 -0
  165. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_fwrite.c.o.d +65 -0
  166. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_gcd.c.o.d +65 -0
  167. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_get_int.c.o.d +65 -0
  168. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_grow.c.o.d +65 -0
  169. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_init.c.o.d +65 -0
  170. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_init_copy.c.o.d +65 -0
  171. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_init_multi.c.o.d +65 -0
  172. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_init_set.c.o.d +65 -0
  173. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_init_set_int.c.o.d +65 -0
  174. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_init_size.c.o.d +65 -0
  175. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_invmod.c.o.d +65 -0
  176. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_invmod_slow.c.o.d +65 -0
  177. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_is_square.c.o.d +65 -0
  178. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_jacobi.c.o.d +65 -0
  179. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_karatsuba_mul.c.o.d +65 -0
  180. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_karatsuba_sqr.c.o.d +65 -0
  181. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_lcm.c.o.d +65 -0
  182. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_lshd.c.o.d +65 -0
  183. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mod.c.o.d +65 -0
  184. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mod_2d.c.o.d +65 -0
  185. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mod_d.c.o.d +65 -0
  186. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_montgomery_calc_normalization.c.o.d +65 -0
  187. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_montgomery_reduce.c.o.d +65 -0
  188. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_montgomery_setup.c.o.d +65 -0
  189. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mul.c.o.d +65 -0
  190. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mul_2.c.o.d +65 -0
  191. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mul_2d.c.o.d +65 -0
  192. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mul_d.c.o.d +65 -0
  193. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_mulmod.c.o.d +65 -0
  194. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_n_root.c.o.d +65 -0
  195. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_neg.c.o.d +65 -0
  196. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_or.c.o.d +65 -0
  197. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_fermat.c.o.d +65 -0
  198. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_is_divisible.c.o.d +65 -0
  199. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_is_prime.c.o.d +65 -0
  200. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_miller_rabin.c.o.d +65 -0
  201. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_next_prime.c.o.d +65 -0
  202. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_rabin_miller_trials.c.o.d +65 -0
  203. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_prime_random_ex.c.o.d +65 -0
  204. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_radix_size.c.o.d +65 -0
  205. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_radix_smap.c.o.d +65 -0
  206. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_rand.c.o.d +65 -0
  207. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_read_radix.c.o.d +65 -0
  208. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_read_signed_bin.c.o.d +65 -0
  209. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_read_unsigned_bin.c.o.d +65 -0
  210. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce.c.o.d +65 -0
  211. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_2k.c.o.d +65 -0
  212. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_2k_l.c.o.d +65 -0
  213. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_2k_setup.c.o.d +65 -0
  214. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_2k_setup_l.c.o.d +65 -0
  215. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_is_2k.c.o.d +65 -0
  216. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_is_2k_l.c.o.d +65 -0
  217. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_reduce_setup.c.o.d +65 -0
  218. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_rshd.c.o.d +65 -0
  219. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_set.c.o.d +65 -0
  220. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_set_int.c.o.d +65 -0
  221. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_shrink.c.o.d +65 -0
  222. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_signed_bin_size.c.o.d +65 -0
  223. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_sqr.c.o.d +65 -0
  224. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_sqrmod.c.o.d +65 -0
  225. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_sqrt.c.o.d +65 -0
  226. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_sub.c.o.d +65 -0
  227. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_sub_d.c.o.d +65 -0
  228. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_submod.c.o.d +65 -0
  229. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_to_signed_bin.c.o.d +65 -0
  230. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_to_signed_bin_n.c.o.d +65 -0
  231. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_to_unsigned_bin.c.o.d +65 -0
  232. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_to_unsigned_bin_n.c.o.d +65 -0
  233. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_toom_mul.c.o.d +65 -0
  234. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_toom_sqr.c.o.d +65 -0
  235. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_toradix.c.o.d +65 -0
  236. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_toradix_n.c.o.d +65 -0
  237. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_unsigned_bin_size.c.o.d +65 -0
  238. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_xor.c.o.d +65 -0
  239. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_mp_zero.c.o.d +65 -0
  240. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_prime_tab.c.o.d +65 -0
  241. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_reverse.c.o.d +65 -0
  242. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_s_mp_add.c.o.d +65 -0
  243. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_s_mp_exptmod.c.o.d +65 -0
  244. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_s_mp_mul_digs.c.o.d +65 -0
  245. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_s_mp_mul_high_digs.c.o.d +65 -0
  246. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_s_mp_sqr.c.o.d +65 -0
  247. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bn_s_mp_sub.c.o.d +65 -0
  248. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/libtommath/bncore.c.o.d +65 -0
  249. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/lzma/C/LzFind.c.o.d +18 -0
  250. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/lzma/C/LzmaDec.c.o.d +17 -0
  251. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/lzma/C/LzmaEnc.c.o.d +18 -0
  252. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/pklib/explode.c.o.d +16 -0
  253. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/pklib/implode.c.o.d +23 -0
  254. data/ext/stormlib/StormLib/CMakeFiles/storm.dir/src/sparse/sparse.cpp.o.d +16 -0
  255. data/ext/stormlib/StormLib/CMakeLists.txt +418 -0
  256. data/ext/stormlib/StormLib/Info.plist +22 -0
  257. data/ext/stormlib/StormLib/LICENSE +21 -0
  258. data/ext/stormlib/StormLib/Premake5.lua +132 -0
  259. data/ext/stormlib/StormLib/README.md +39 -0
  260. data/ext/stormlib/StormLib/StormLib.sln +162 -0
  261. data/ext/stormlib/StormLib/StormLib.vcxproj +1024 -0
  262. data/ext/stormlib/StormLib/StormLib.vcxproj.filters +221 -0
  263. data/ext/stormlib/StormLib/StormLib.xcodeproj/project.pbxproj +2104 -0
  264. data/ext/stormlib/StormLib/StormLib_dll.vcxproj +348 -0
  265. data/ext/stormlib/StormLib/StormLib_dll.vcxproj.filters +229 -0
  266. data/ext/stormlib/StormLib/StormLib_test.vcxproj +360 -0
  267. data/ext/stormlib/StormLib/StormLib_test.vcxproj.filters +230 -0
  268. data/ext/stormlib/StormLib/StormLib_vs08.sln +139 -0
  269. data/ext/stormlib/StormLib/StormLib_vs08.vcproj +4205 -0
  270. data/ext/stormlib/StormLib/StormLib_vs08_dll.vcproj +1851 -0
  271. data/ext/stormlib/StormLib/StormLib_vs08_test.vcproj +1289 -0
  272. data/ext/stormlib/StormLib/doc/History.txt +78 -0
  273. data/ext/stormlib/StormLib/doc/The MoPaQ File Format 0.9.txt +318 -0
  274. data/ext/stormlib/StormLib/doc/The MoPaQ File Format 1.0.txt +433 -0
  275. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-deDE.txt +1 -0
  276. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-enGB.txt +1 -0
  277. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-enSG.txt +1 -0
  278. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-enUS.txt +1 -0
  279. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-esES.txt +1 -0
  280. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-esMX.txt +1 -0
  281. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-frFR.txt +1 -0
  282. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-itIT.txt +1 -0
  283. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-koKR.txt +1 -0
  284. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-plPL.txt +1 -0
  285. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-ptBR.txt +1 -0
  286. data/ext/stormlib/StormLib/doc/d3-authenticationcode/d3-authenticationcode-zhTW.txt +1 -0
  287. data/ext/stormlib/StormLib/doc/hots-authenticationcode/hots-authenticationcode-bgdl.txt +1 -0
  288. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-deDE.txt +1 -0
  289. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-enGB.txt +1 -0
  290. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-enUS.txt +1 -0
  291. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-esES.txt +1 -0
  292. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-esMX.txt +1 -0
  293. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-frFR.txt +1 -0
  294. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-itIT.txt +1 -0
  295. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-koKR.txt +1 -0
  296. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-plPL.txt +1 -0
  297. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-ptBR.txt +1 -0
  298. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-ruRU.txt +1 -0
  299. data/ext/stormlib/StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-zhTW.txt +1 -0
  300. data/ext/stormlib/StormLib/make-msvc.bat +95 -0
  301. data/ext/stormlib/StormLib/make.bat +46 -0
  302. data/ext/stormlib/StormLib/sources +14 -0
  303. data/ext/stormlib/StormLib/src/DllMain.c +24 -0
  304. data/ext/stormlib/StormLib/src/DllMain.def +79 -0
  305. data/ext/stormlib/StormLib/src/DllMain.rc +110 -0
  306. data/ext/stormlib/StormLib/src/FileStream.cpp +2928 -0
  307. data/ext/stormlib/StormLib/src/FileStream.h +217 -0
  308. data/ext/stormlib/StormLib/src/LibTomCrypt.c +85 -0
  309. data/ext/stormlib/StormLib/src/LibTomMath.c +125 -0
  310. data/ext/stormlib/StormLib/src/LibTomMathDesc.c +4 -0
  311. data/ext/stormlib/StormLib/src/SBaseCommon.cpp +1970 -0
  312. data/ext/stormlib/StormLib/src/SBaseDumpData.cpp +183 -0
  313. data/ext/stormlib/StormLib/src/SBaseFileTable.cpp +3194 -0
  314. data/ext/stormlib/StormLib/src/SBaseSubTypes.cpp +688 -0
  315. data/ext/stormlib/StormLib/src/SCompression.cpp +1183 -0
  316. data/ext/stormlib/StormLib/src/SFileAddFile.cpp +1337 -0
  317. data/ext/stormlib/StormLib/src/SFileAttributes.cpp +573 -0
  318. data/ext/stormlib/StormLib/src/SFileCompactArchive.cpp +654 -0
  319. data/ext/stormlib/StormLib/src/SFileCreateArchive.cpp +285 -0
  320. data/ext/stormlib/StormLib/src/SFileExtractFile.cpp +64 -0
  321. data/ext/stormlib/StormLib/src/SFileFindFile.cpp +484 -0
  322. data/ext/stormlib/StormLib/src/SFileGetFileInfo.cpp +627 -0
  323. data/ext/stormlib/StormLib/src/SFileListFile.cpp +750 -0
  324. data/ext/stormlib/StormLib/src/SFileOpenArchive.cpp +723 -0
  325. data/ext/stormlib/StormLib/src/SFileOpenFileEx.cpp +423 -0
  326. data/ext/stormlib/StormLib/src/SFilePatchArchives.cpp +1175 -0
  327. data/ext/stormlib/StormLib/src/SFileReadFile.cpp +922 -0
  328. data/ext/stormlib/StormLib/src/SFileVerify.cpp +1059 -0
  329. data/ext/stormlib/StormLib/src/StormCommon.h +450 -0
  330. data/ext/stormlib/StormLib/src/StormLib.exp +74 -0
  331. data/ext/stormlib/StormLib/src/StormLib.h +1157 -0
  332. data/ext/stormlib/StormLib/src/StormPort.h +474 -0
  333. data/ext/stormlib/StormLib/src/adpcm/adpcm.cpp +539 -0
  334. data/ext/stormlib/StormLib/src/adpcm/adpcm.h +27 -0
  335. data/ext/stormlib/StormLib/src/bzip2/blocksort.c +1094 -0
  336. data/ext/stormlib/StormLib/src/bzip2/bzlib.c +1573 -0
  337. data/ext/stormlib/StormLib/src/bzip2/bzlib.h +282 -0
  338. data/ext/stormlib/StormLib/src/bzip2/bzlib_private.h +509 -0
  339. data/ext/stormlib/StormLib/src/bzip2/compress.c +672 -0
  340. data/ext/stormlib/StormLib/src/bzip2/crctable.c +104 -0
  341. data/ext/stormlib/StormLib/src/bzip2/decompress.c +626 -0
  342. data/ext/stormlib/StormLib/src/bzip2/huffman.c +205 -0
  343. data/ext/stormlib/StormLib/src/bzip2/randtable.c +84 -0
  344. data/ext/stormlib/StormLib/src/huffman/huff.cpp +915 -0
  345. data/ext/stormlib/StormLib/src/huffman/huff.h +143 -0
  346. data/ext/stormlib/StormLib/src/jenkins/lookup.h +24 -0
  347. data/ext/stormlib/StormLib/src/jenkins/lookup3.c +1003 -0
  348. data/ext/stormlib/StormLib/src/libtomcrypt/src/hashes/hash_memory.c +69 -0
  349. data/ext/stormlib/StormLib/src/libtomcrypt/src/hashes/md5.c +368 -0
  350. data/ext/stormlib/StormLib/src/libtomcrypt/src/hashes/sha1.c +288 -0
  351. data/ext/stormlib/StormLib/src/libtomcrypt/src/hashes/sha256.c +340 -0
  352. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt.h +91 -0
  353. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_argchk.h +38 -0
  354. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_cfg.h +144 -0
  355. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_cipher.h +891 -0
  356. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_custom.h +424 -0
  357. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_hash.h +378 -0
  358. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_mac.h +384 -0
  359. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_macros.h +424 -0
  360. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_math.h +500 -0
  361. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_misc.h +23 -0
  362. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_pk.h +558 -0
  363. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_pkcs.h +89 -0
  364. data/ext/stormlib/StormLib/src/libtomcrypt/src/headers/tomcrypt_prng.h +199 -0
  365. data/ext/stormlib/StormLib/src/libtomcrypt/src/math/ltm_desc.c +483 -0
  366. data/ext/stormlib/StormLib/src/libtomcrypt/src/math/multi.c +61 -0
  367. data/ext/stormlib/StormLib/src/libtomcrypt/src/math/rand_prime.c +87 -0
  368. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/base64_decode.c +104 -0
  369. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_argchk.c +30 -0
  370. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_find_hash.c +40 -0
  371. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_find_prng.c +41 -0
  372. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_hash_descriptor.c +27 -0
  373. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_hash_is_valid.c +36 -0
  374. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_libc.c +43 -0
  375. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c +13 -0
  376. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_prng_descriptor.c +26 -0
  377. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_prng_is_valid.c +36 -0
  378. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_register_hash.c +54 -0
  379. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/crypt_register_prng.c +54 -0
  380. data/ext/stormlib/StormLib/src/libtomcrypt/src/misc/zeromem.c +34 -0
  381. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c +102 -0
  382. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_boolean.c +47 -0
  383. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_choice.c +182 -0
  384. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c +96 -0
  385. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_integer.c +110 -0
  386. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c +99 -0
  387. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c +91 -0
  388. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c +96 -0
  389. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c +287 -0
  390. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c +386 -0
  391. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c +139 -0
  392. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c +68 -0
  393. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utctime.c +127 -0
  394. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c +111 -0
  395. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_bit_string.c +89 -0
  396. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_boolean.c +51 -0
  397. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.c +85 -0
  398. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_integer.c +130 -0
  399. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.c +111 -0
  400. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_octet_string.c +86 -0
  401. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_printable_string.c +85 -0
  402. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.c +335 -0
  403. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.c +138 -0
  404. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_set.c +103 -0
  405. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_setof.c +162 -0
  406. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_short_integer.c +97 -0
  407. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_utctime.c +83 -0
  408. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.c +105 -0
  409. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_bit_string.c +54 -0
  410. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_boolean.c +35 -0
  411. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c +194 -0
  412. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_integer.c +82 -0
  413. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c +89 -0
  414. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_octet_string.c +53 -0
  415. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_printable_string.c +166 -0
  416. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_sequence.c +169 -0
  417. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_short_integer.c +70 -0
  418. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utctime.c +46 -0
  419. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c +83 -0
  420. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/asn1/der_sequence_free.c +65 -0
  421. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c +76 -0
  422. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c +207 -0
  423. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c +222 -0
  424. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c +60 -0
  425. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c +196 -0
  426. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c +147 -0
  427. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c +108 -0
  428. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c +189 -0
  429. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c +177 -0
  430. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c +175 -0
  431. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c +110 -0
  432. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c +111 -0
  433. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_exptmod.c +113 -0
  434. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_free.c +34 -0
  435. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_import.c +143 -0
  436. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_make_key.c +112 -0
  437. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_sign_hash.c +134 -0
  438. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c +167 -0
  439. data/ext/stormlib/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c +87 -0
  440. data/ext/stormlib/StormLib/src/libtommath/bn_fast_mp_invmod.c +148 -0
  441. data/ext/stormlib/StormLib/src/libtommath/bn_fast_mp_montgomery_reduce.c +172 -0
  442. data/ext/stormlib/StormLib/src/libtommath/bn_fast_s_mp_mul_digs.c +107 -0
  443. data/ext/stormlib/StormLib/src/libtommath/bn_fast_s_mp_mul_high_digs.c +98 -0
  444. data/ext/stormlib/StormLib/src/libtommath/bn_fast_s_mp_sqr.c +114 -0
  445. data/ext/stormlib/StormLib/src/libtommath/bn_mp_2expt.c +48 -0
  446. data/ext/stormlib/StormLib/src/libtommath/bn_mp_abs.c +43 -0
  447. data/ext/stormlib/StormLib/src/libtommath/bn_mp_add.c +53 -0
  448. data/ext/stormlib/StormLib/src/libtommath/bn_mp_add_d.c +112 -0
  449. data/ext/stormlib/StormLib/src/libtommath/bn_mp_addmod.c +41 -0
  450. data/ext/stormlib/StormLib/src/libtommath/bn_mp_and.c +57 -0
  451. data/ext/stormlib/StormLib/src/libtommath/bn_mp_clamp.c +44 -0
  452. data/ext/stormlib/StormLib/src/libtommath/bn_mp_clear.c +44 -0
  453. data/ext/stormlib/StormLib/src/libtommath/bn_mp_clear_multi.c +34 -0
  454. data/ext/stormlib/StormLib/src/libtommath/bn_mp_cmp.c +43 -0
  455. data/ext/stormlib/StormLib/src/libtommath/bn_mp_cmp_d.c +44 -0
  456. data/ext/stormlib/StormLib/src/libtommath/bn_mp_cmp_mag.c +55 -0
  457. data/ext/stormlib/StormLib/src/libtommath/bn_mp_cnt_lsb.c +53 -0
  458. data/ext/stormlib/StormLib/src/libtommath/bn_mp_copy.c +68 -0
  459. data/ext/stormlib/StormLib/src/libtommath/bn_mp_count_bits.c +45 -0
  460. data/ext/stormlib/StormLib/src/libtommath/bn_mp_div.c +292 -0
  461. data/ext/stormlib/StormLib/src/libtommath/bn_mp_div_2.c +68 -0
  462. data/ext/stormlib/StormLib/src/libtommath/bn_mp_div_2d.c +97 -0
  463. data/ext/stormlib/StormLib/src/libtommath/bn_mp_div_3.c +79 -0
  464. data/ext/stormlib/StormLib/src/libtommath/bn_mp_div_d.c +115 -0
  465. data/ext/stormlib/StormLib/src/libtommath/bn_mp_dr_is_modulus.c +43 -0
  466. data/ext/stormlib/StormLib/src/libtommath/bn_mp_dr_reduce.c +94 -0
  467. data/ext/stormlib/StormLib/src/libtommath/bn_mp_dr_setup.c +32 -0
  468. data/ext/stormlib/StormLib/src/libtommath/bn_mp_exch.c +34 -0
  469. data/ext/stormlib/StormLib/src/libtommath/bn_mp_expt_d.c +57 -0
  470. data/ext/stormlib/StormLib/src/libtommath/bn_mp_exptmod.c +112 -0
  471. data/ext/stormlib/StormLib/src/libtommath/bn_mp_exptmod_fast.c +321 -0
  472. data/ext/stormlib/StormLib/src/libtommath/bn_mp_exteuclid.c +82 -0
  473. data/ext/stormlib/StormLib/src/libtommath/bn_mp_fread.c +67 -0
  474. data/ext/stormlib/StormLib/src/libtommath/bn_mp_fwrite.c +52 -0
  475. data/ext/stormlib/StormLib/src/libtommath/bn_mp_gcd.c +105 -0
  476. data/ext/stormlib/StormLib/src/libtommath/bn_mp_get_int.c +45 -0
  477. data/ext/stormlib/StormLib/src/libtommath/bn_mp_grow.c +57 -0
  478. data/ext/stormlib/StormLib/src/libtommath/bn_mp_init.c +46 -0
  479. data/ext/stormlib/StormLib/src/libtommath/bn_mp_init_copy.c +32 -0
  480. data/ext/stormlib/StormLib/src/libtommath/bn_mp_init_multi.c +59 -0
  481. data/ext/stormlib/StormLib/src/libtommath/bn_mp_init_set.c +32 -0
  482. data/ext/stormlib/StormLib/src/libtommath/bn_mp_init_set_int.c +31 -0
  483. data/ext/stormlib/StormLib/src/libtommath/bn_mp_init_size.c +48 -0
  484. data/ext/stormlib/StormLib/src/libtommath/bn_mp_invmod.c +43 -0
  485. data/ext/stormlib/StormLib/src/libtommath/bn_mp_invmod_slow.c +175 -0
  486. data/ext/stormlib/StormLib/src/libtommath/bn_mp_is_square.c +109 -0
  487. data/ext/stormlib/StormLib/src/libtommath/bn_mp_jacobi.c +105 -0
  488. data/ext/stormlib/StormLib/src/libtommath/bn_mp_karatsuba_mul.c +167 -0
  489. data/ext/stormlib/StormLib/src/libtommath/bn_mp_karatsuba_sqr.c +121 -0
  490. data/ext/stormlib/StormLib/src/libtommath/bn_mp_lcm.c +60 -0
  491. data/ext/stormlib/StormLib/src/libtommath/bn_mp_lshd.c +67 -0
  492. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mod.c +48 -0
  493. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mod_2d.c +55 -0
  494. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mod_d.c +27 -0
  495. data/ext/stormlib/StormLib/src/libtommath/bn_mp_montgomery_calc_normalization.c +59 -0
  496. data/ext/stormlib/StormLib/src/libtommath/bn_mp_montgomery_reduce.c +118 -0
  497. data/ext/stormlib/StormLib/src/libtommath/bn_mp_montgomery_setup.c +59 -0
  498. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mul.c +66 -0
  499. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mul_2.c +82 -0
  500. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mul_2d.c +85 -0
  501. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mul_d.c +79 -0
  502. data/ext/stormlib/StormLib/src/libtommath/bn_mp_mulmod.c +40 -0
  503. data/ext/stormlib/StormLib/src/libtommath/bn_mp_n_root.c +132 -0
  504. data/ext/stormlib/StormLib/src/libtommath/bn_mp_neg.c +40 -0
  505. data/ext/stormlib/StormLib/src/libtommath/bn_mp_or.c +50 -0
  506. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_fermat.c +62 -0
  507. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_is_divisible.c +50 -0
  508. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_is_prime.c +83 -0
  509. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_miller_rabin.c +103 -0
  510. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_next_prime.c +170 -0
  511. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_rabin_miller_trials.c +52 -0
  512. data/ext/stormlib/StormLib/src/libtommath/bn_mp_prime_random_ex.c +125 -0
  513. data/ext/stormlib/StormLib/src/libtommath/bn_mp_radix_size.c +78 -0
  514. data/ext/stormlib/StormLib/src/libtommath/bn_mp_radix_smap.c +24 -0
  515. data/ext/stormlib/StormLib/src/libtommath/bn_mp_rand.c +55 -0
  516. data/ext/stormlib/StormLib/src/libtommath/bn_mp_read_radix.c +85 -0
  517. data/ext/stormlib/StormLib/src/libtommath/bn_mp_read_signed_bin.c +41 -0
  518. data/ext/stormlib/StormLib/src/libtommath/bn_mp_read_unsigned_bin.c +55 -0
  519. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce.c +100 -0
  520. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_2k.c +61 -0
  521. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_2k_l.c +62 -0
  522. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_2k_setup.c +47 -0
  523. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_2k_setup_l.c +44 -0
  524. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_is_2k.c +52 -0
  525. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_is_2k_l.c +44 -0
  526. data/ext/stormlib/StormLib/src/libtommath/bn_mp_reduce_setup.c +34 -0
  527. data/ext/stormlib/StormLib/src/libtommath/bn_mp_rshd.c +72 -0
  528. data/ext/stormlib/StormLib/src/libtommath/bn_mp_set.c +29 -0
  529. data/ext/stormlib/StormLib/src/libtommath/bn_mp_set_int.c +48 -0
  530. data/ext/stormlib/StormLib/src/libtommath/bn_mp_shrink.c +35 -0
  531. data/ext/stormlib/StormLib/src/libtommath/bn_mp_signed_bin_size.c +27 -0
  532. data/ext/stormlib/StormLib/src/libtommath/bn_mp_sqr.c +58 -0
  533. data/ext/stormlib/StormLib/src/libtommath/bn_mp_sqrmod.c +41 -0
  534. data/ext/stormlib/StormLib/src/libtommath/bn_mp_sqrt.c +81 -0
  535. data/ext/stormlib/StormLib/src/libtommath/bn_mp_sub.c +59 -0
  536. data/ext/stormlib/StormLib/src/libtommath/bn_mp_sub_d.c +93 -0
  537. data/ext/stormlib/StormLib/src/libtommath/bn_mp_submod.c +42 -0
  538. data/ext/stormlib/StormLib/src/libtommath/bn_mp_to_signed_bin.c +33 -0
  539. data/ext/stormlib/StormLib/src/libtommath/bn_mp_to_signed_bin_n.c +31 -0
  540. data/ext/stormlib/StormLib/src/libtommath/bn_mp_to_unsigned_bin.c +48 -0
  541. data/ext/stormlib/StormLib/src/libtommath/bn_mp_to_unsigned_bin_n.c +31 -0
  542. data/ext/stormlib/StormLib/src/libtommath/bn_mp_toom_mul.c +284 -0
  543. data/ext/stormlib/StormLib/src/libtommath/bn_mp_toom_sqr.c +226 -0
  544. data/ext/stormlib/StormLib/src/libtommath/bn_mp_toradix.c +75 -0
  545. data/ext/stormlib/StormLib/src/libtommath/bn_mp_toradix_n.c +88 -0
  546. data/ext/stormlib/StormLib/src/libtommath/bn_mp_unsigned_bin_size.c +28 -0
  547. data/ext/stormlib/StormLib/src/libtommath/bn_mp_xor.c +51 -0
  548. data/ext/stormlib/StormLib/src/libtommath/bn_mp_zero.c +36 -0
  549. data/ext/stormlib/StormLib/src/libtommath/bn_prime_tab.c +61 -0
  550. data/ext/stormlib/StormLib/src/libtommath/bn_reverse.c +39 -0
  551. data/ext/stormlib/StormLib/src/libtommath/bn_s_mp_add.c +109 -0
  552. data/ext/stormlib/StormLib/src/libtommath/bn_s_mp_exptmod.c +252 -0
  553. data/ext/stormlib/StormLib/src/libtommath/bn_s_mp_mul_digs.c +90 -0
  554. data/ext/stormlib/StormLib/src/libtommath/bn_s_mp_mul_high_digs.c +81 -0
  555. data/ext/stormlib/StormLib/src/libtommath/bn_s_mp_sqr.c +84 -0
  556. data/ext/stormlib/StormLib/src/libtommath/bn_s_mp_sub.c +89 -0
  557. data/ext/stormlib/StormLib/src/libtommath/bncore.c +36 -0
  558. data/ext/stormlib/StormLib/src/libtommath/tommath.h +584 -0
  559. data/ext/stormlib/StormLib/src/libtommath/tommath_class.h +999 -0
  560. data/ext/stormlib/StormLib/src/libtommath/tommath_superclass.h +76 -0
  561. data/ext/stormlib/StormLib/src/lzma/C/LzFind.c +761 -0
  562. data/ext/stormlib/StormLib/src/lzma/C/LzFind.h +115 -0
  563. data/ext/stormlib/StormLib/src/lzma/C/LzFindMt.c +793 -0
  564. data/ext/stormlib/StormLib/src/lzma/C/LzFindMt.h +105 -0
  565. data/ext/stormlib/StormLib/src/lzma/C/LzHash.h +54 -0
  566. data/ext/stormlib/StormLib/src/lzma/C/LzmaDec.c +999 -0
  567. data/ext/stormlib/StormLib/src/lzma/C/LzmaDec.h +231 -0
  568. data/ext/stormlib/StormLib/src/lzma/C/LzmaEnc.c +2268 -0
  569. data/ext/stormlib/StormLib/src/lzma/C/LzmaEnc.h +80 -0
  570. data/ext/stormlib/StormLib/src/lzma/C/Threads.c +84 -0
  571. data/ext/stormlib/StormLib/src/lzma/C/Threads.h +59 -0
  572. data/ext/stormlib/StormLib/src/lzma/C/Types.h +236 -0
  573. data/ext/stormlib/StormLib/src/lzma/info.txt +1 -0
  574. data/ext/stormlib/StormLib/src/pklib/crc32.c +66 -0
  575. data/ext/stormlib/StormLib/src/pklib/explode.c +521 -0
  576. data/ext/stormlib/StormLib/src/pklib/implode.c +674 -0
  577. data/ext/stormlib/StormLib/src/pklib/pklib.h +160 -0
  578. data/ext/stormlib/StormLib/src/resource.h +15 -0
  579. data/ext/stormlib/StormLib/src/sparse/sparse.cpp +287 -0
  580. data/ext/stormlib/StormLib/src/sparse/sparse.h +17 -0
  581. data/ext/stormlib/StormLib/src/wdk/sources-cpp.cpp +26 -0
  582. data/ext/stormlib/StormLib/src/wdk/sources-wdk-bzip2.c +13 -0
  583. data/ext/stormlib/StormLib/src/wdk/sources-wdk-ltc.c +4 -0
  584. data/ext/stormlib/StormLib/src/wdk/sources-wdk-lzma.c +8 -0
  585. data/ext/stormlib/StormLib/src/wdk/sources-wdk-misc.c +6 -0
  586. data/ext/stormlib/StormLib/src/wdk/sources-wdk-tomcrypt.c +82 -0
  587. data/ext/stormlib/StormLib/src/wdk/sources-wdk-tommath.c +123 -0
  588. data/ext/stormlib/StormLib/src/wdk/sources-wdk-zlib.c +21 -0
  589. data/ext/stormlib/StormLib/src/zlib/adler32.c +169 -0
  590. data/ext/stormlib/StormLib/src/zlib/compress.c +80 -0
  591. data/ext/stormlib/StormLib/src/zlib/compress_zlib.c +5 -0
  592. data/ext/stormlib/StormLib/src/zlib/crc32.c +442 -0
  593. data/ext/stormlib/StormLib/src/zlib/crc32.h +441 -0
  594. data/ext/stormlib/StormLib/src/zlib/deflate.c +1834 -0
  595. data/ext/stormlib/StormLib/src/zlib/deflate.h +342 -0
  596. data/ext/stormlib/StormLib/src/zlib/gzguts.h +218 -0
  597. data/ext/stormlib/StormLib/src/zlib/inffast.c +340 -0
  598. data/ext/stormlib/StormLib/src/zlib/inffast.h +11 -0
  599. data/ext/stormlib/StormLib/src/zlib/inffixed.h +94 -0
  600. data/ext/stormlib/StormLib/src/zlib/inflate.c +1480 -0
  601. data/ext/stormlib/StormLib/src/zlib/inflate.h +130 -0
  602. data/ext/stormlib/StormLib/src/zlib/inftrees.c +330 -0
  603. data/ext/stormlib/StormLib/src/zlib/inftrees.h +67 -0
  604. data/ext/stormlib/StormLib/src/zlib/trees.c +1244 -0
  605. data/ext/stormlib/StormLib/src/zlib/trees.h +128 -0
  606. data/ext/stormlib/StormLib/src/zlib/zconf.h +428 -0
  607. data/ext/stormlib/StormLib/src/zlib/zlib.h +1613 -0
  608. data/ext/stormlib/StormLib/src/zlib/zutil.c +318 -0
  609. data/ext/stormlib/StormLib/src/zlib/zutil.h +274 -0
  610. data/ext/stormlib/StormLib/storm_dll/storm.cpp +117 -0
  611. data/ext/stormlib/StormLib/storm_dll/storm.def +25 -0
  612. data/ext/stormlib/StormLib/storm_dll/storm.h +65 -0
  613. data/ext/stormlib/StormLib/storm_dll/storm.vcxproj +209 -0
  614. data/ext/stormlib/StormLib/storm_dll/storm.vcxproj.filters +28 -0
  615. data/ext/stormlib/StormLib/storm_dll/storm_test.cpp +182 -0
  616. data/ext/stormlib/StormLib/storm_dll/storm_test.vcxproj +202 -0
  617. data/ext/stormlib/StormLib/storm_dll/storm_test.vcxproj.filters +22 -0
  618. data/ext/stormlib/StormLib/test/StormTest.cpp +4393 -0
  619. data/ext/stormlib/StormLib/test/TLogHelper.cpp +567 -0
  620. data/ext/stormlib/StormLib/test/stormlib-test-001.txt +164 -0
  621. data/ext/stormlib/extconf.rb +0 -2
  622. data/lib/stormlib/version.rb +1 -1
  623. data/stormlib.gemspec +1 -1
  624. metadata +621 -2
@@ -0,0 +1,1157 @@
1
+ /*****************************************************************************/
2
+ /* StormLib.h Copyright (c) Ladislav Zezula 1999-2017 */
3
+ /*---------------------------------------------------------------------------*/
4
+ /* StormLib library v 9.22 */
5
+ /* */
6
+ /* Author : Ladislav Zezula */
7
+ /* E-mail : ladik@zezula.net */
8
+ /* WWW : http://www.zezula.net */
9
+ /*---------------------------------------------------------------------------*/
10
+ /* Date Ver Who Comment */
11
+ /* -------- ---- --- ------- */
12
+ /* xx.xx.99 1.00 Lad Created */
13
+ /* 24.03.03 2.50 Lad Version 2.50 */
14
+ /* 02.04.03 3.00 Lad Version 3.00 with compression */
15
+ /* 11.04.03 3.01 Lad Renamed to StormLib.h for compatibility with */
16
+ /* original headers for Storm.dll */
17
+ /* 10.05.03 3.02 Lad Added Pkware DCL compression */
18
+ /* 26.05.03 4.00 Lad Completed all compressions */
19
+ /* 18.06.03 4.01 Lad Added SFileSetFileLocale */
20
+ /* Added SFileExtractFile */
21
+ /* 26.07.03 4.02 Lad Implemented nameless rename and delete */
22
+ /* 26.07.03 4.03 Lad Added support for protected MPQs */
23
+ /* 28.08.03 4.10 Lad Fixed bugs that caused StormLib incorrectly work */
24
+ /* with Diablo I savegames and with files having full */
25
+ /* hash table */
26
+ /* 08.12.03 4.11 DCH Fixed bug in reading file sector larger than 0x1000 */
27
+ /* on certain files. */
28
+ /* Fixed bug in AddFile with MPQ_FILE_REPLACEEXISTING */
29
+ /* (Thanx Daniel Chiamarello, dchiamarello@madvawes.com)*/
30
+ /* 21.12.03 4.50 Lad Completed port for Mac */
31
+ /* Fixed bug in compacting (if fsize is mul of 0x1000) */
32
+ /* Fixed bug in SCompCompress */
33
+ /* 27.05.04 4.51 Lad Changed memory management from new/delete to our */
34
+ /* own macros */
35
+ /* 22.06.04 4.60 Lad Optimized search. Support for multiple listfiles. */
36
+ /* 30.09.04 4.61 Lad Fixed some bugs (Aaargh !!!) */
37
+ /* Correctly works if HashTableSize > BlockTableSize */
38
+ /* 29.12.04 4.70 Lad Fixed compatibility problem with MPQs from WoW */
39
+ /* 14.07.05 5.00 Lad Added the BZLIB compression support */
40
+ /* Added suport of files stored as single unit */
41
+ /* 17.04.06 5.01 Lad Converted to MS Visual Studio 8.0 */
42
+ /* Fixed issue with protected Warcraft 3 protected maps */
43
+ /* 15.05.06 5.02 Lad Fixed issue with WoW 1.10+ */
44
+ /* 07.09.06 5.10 Lad Fixed processing files longer than 2GB */
45
+ /* 22.11.06 6.00 Lad Support for MPQ archives V2 */
46
+ /* 12.06.07 6.10 Lad Support for (attributes) file */
47
+ /* 10.09.07 6.12 Lad Support for MPQs protected by corrupting hash table */
48
+ /* 03.12.07 6.13 Lad Support for MPQs with hash tbl size > block tbl size */
49
+ /* 07.04.08 6.20 Lad Added SFileFlushArchive */
50
+ /* 09.04.08 Lad Removed FilePointer variable from MPQ handle */
51
+ /* structure, as it caused more problems than benefits */
52
+ /* 12.05.08 6.22 Lad Support for w3xMaster map protector */
53
+ /* 05.10.08 6.23 Lad Support for protectors who set negative values in */
54
+ /* the table of file blocks */
55
+ /* 26.05.09 6.24 Lad Fixed search for multiple lang files with deleted */
56
+ /* entries */
57
+ /* 03.09.09 6.25 Lad Fixed decompression bug in huffmann decompression */
58
+ /* 22.03.10 6.50 Lad New compressions in Starcraft II (LZMA, sparse) */
59
+ /* Fixed compacting MPQs that contain single unit files */
60
+ /* 26.04.10 7.00 Lad Major rewrite */
61
+ /* 08.06.10 7.10 Lad Support for partial MPQs */
62
+ /* 08.07.10 7.11 Lad Support for MPQs v 3.0 */
63
+ /* 20.08.10 7.20 Lad Support for opening multiple MPQs in patch mode */
64
+ /* 20.09.10 8.00 Lad MPQs v 4, HET and BET tables */
65
+ /* 07.01.11 8.01 Lad Write support for MPQs v 3 and 4 */
66
+ /* 15.09.11 8.04 Lad Bug fixes, testing for Diablo III MPQs */
67
+ /* 26.04.12 8.10 Lad Support for data map, added SFileGetArchiveBitmap */
68
+ /* 29.05.12 8.20 Lad C-only interface */
69
+ /* 14.01.13 8.21 Lad ADPCM and Huffmann (de)compression refactored */
70
+ /* 04.12.13 9.00 Lad Unit tests, bug fixes */
71
+ /* 27.08.14 9.10 Lad Signing archives with weak digital signature */
72
+ /* 25.11.14 9.11 Lad Fixed bug reading & creating HET table */
73
+ /* 18.09.15 9.20 Lad Release 9.20 */
74
+ /* 12.12.16 9.21 Lad Release 9.21 */
75
+ /* 10.11.17 9.22 Lad Release 9.22 */
76
+ /* 28.09.22 9.24 Lad lcLocale -> lcFileLocale, also contains platform */
77
+ /*****************************************************************************/
78
+
79
+ #ifndef __STORMLIB_H__
80
+ #define __STORMLIB_H__
81
+
82
+ #ifdef _MSC_VER
83
+ #pragma warning(disable:4668) // 'XXX' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
84
+ #pragma warning(disable:4820) // 'XXX' : '2' bytes padding added after data member 'XXX::yyy'
85
+ #endif
86
+
87
+ #include "StormPort.h"
88
+
89
+ #ifdef __cplusplus
90
+ extern "C" {
91
+ #endif
92
+
93
+ //-----------------------------------------------------------------------------
94
+ // Use the apropriate library
95
+ //
96
+ // The library type is encoded in the library name as the following
97
+ // StormLibXYZ.lib
98
+ //
99
+ // X - D for Debug version, R for Release version
100
+ // Y - A for ANSI version, U for Unicode version
101
+ // Z - S for static-linked CRT library, D for multithreaded DLL CRT library
102
+ //
103
+
104
+ #if defined(__STORMLIB_SELF__) && !defined(STORMLIB_NO_AUTO_LINK)
105
+ #define STORMLIB_NO_AUTO_LINK // Define this if you don't want to link using pragmas when using msvc
106
+ #endif
107
+
108
+ #if defined(_MSC_VER) && !defined(STORMLIB_NO_AUTO_LINK)
109
+ #ifndef WDK_BUILD
110
+ #ifdef _DEBUG // DEBUG VERSIONS
111
+ #ifndef _UNICODE
112
+ #ifdef _DLL
113
+ #pragma comment(lib, "StormLibDAD.lib") // Debug Ansi CRT-DLL version
114
+ #else
115
+ #pragma comment(lib, "StormLibDAS.lib") // Debug Ansi CRT-LIB version
116
+ #endif
117
+ #else
118
+ #ifdef _DLL
119
+ #pragma comment(lib, "StormLibDUD.lib") // Debug Unicode CRT-DLL version
120
+ #else
121
+ #pragma comment(lib, "StormLibDUS.lib") // Debug Unicode CRT-LIB version
122
+ #endif
123
+ #endif
124
+ #else // RELEASE VERSIONS
125
+ #ifndef _UNICODE
126
+ #ifdef _DLL
127
+ #pragma comment(lib, "StormLibRAD.lib") // Release Ansi CRT-DLL version
128
+ #else
129
+ #pragma comment(lib, "StormLibRAS.lib") // Release Ansi CRT-LIB version
130
+ #endif
131
+ #else
132
+ #ifdef _DLL
133
+ #pragma comment(lib, "StormLibRUD.lib") // Release Unicode CRT-DLL version
134
+ #else
135
+ #pragma comment(lib, "StormLibRUS.lib") // Release Unicode CRT-LIB version
136
+ #endif
137
+ #endif
138
+ #endif
139
+ #endif
140
+
141
+ #endif
142
+
143
+ //-----------------------------------------------------------------------------
144
+ // Defines
145
+
146
+ #define STORMLIB_VERSION 0x091A // Current version of StormLib
147
+ #define STORMLIB_VERSION_STRING "9.26" // Current version of StormLib as string
148
+
149
+ #define ID_MPQ 0x1A51504D // MPQ archive header ID ('MPQ\x1A')
150
+ #define ID_MPQ_USERDATA 0x1B51504D // MPQ userdata entry ('MPQ\x1B')
151
+ #define ID_MPK 0x1A4B504D // MPK archive header ID ('MPK\x1A')
152
+
153
+ #define ID_MPK_VERSION_2000 0x30303032 // MPK version ("2000")
154
+
155
+ #define ERROR_AVI_FILE 10000 // Not a MPQ file, but an AVI file.
156
+ #define ERROR_UNKNOWN_FILE_KEY 10001 // Returned by SFileReadFile when can't find file key
157
+ #define ERROR_CHECKSUM_ERROR 10002 // Returned by SFileReadFile when sector CRC doesn't match
158
+ #define ERROR_INTERNAL_FILE 10003 // The given operation is not allowed on internal file
159
+ #define ERROR_BASE_FILE_MISSING 10004 // The file is present as incremental patch file, but base file is missing
160
+ #define ERROR_MARKED_FOR_DELETE 10005 // The file was marked as "deleted" in the MPQ
161
+ #define ERROR_FILE_INCOMPLETE 10006 // The required file part is missing
162
+ #define ERROR_UNKNOWN_FILE_NAMES 10007 // A name of at least one file is unknown
163
+ #define ERROR_CANT_FIND_PATCH_PREFIX 10008 // StormLib was unable to find patch prefix for the patches
164
+ #define ERROR_FAKE_MPQ_HEADER 10009 // The header at this position is fake header
165
+
166
+ // Values for SFileCreateArchive
167
+ #define HASH_TABLE_SIZE_MIN 0x00000004 // Verified: If there is 1 file, hash table size is 4
168
+ #define HASH_TABLE_SIZE_DEFAULT 0x00001000 // Default hash table size for empty MPQs
169
+ #define HASH_TABLE_SIZE_MAX 0x00080000 // Maximum acceptable hash table size
170
+
171
+ #define HASH_ENTRY_DELETED 0xFFFFFFFE // Block index for deleted entry in the hash table
172
+ #define HASH_ENTRY_FREE 0xFFFFFFFF // Block index for free entry in the hash table
173
+
174
+ #define HET_ENTRY_DELETED 0x80 // NameHash1 value for a deleted entry
175
+ #define HET_ENTRY_FREE 0x00 // NameHash1 value for free entry
176
+
177
+ // Values for SFileOpenArchive
178
+ #define SFILE_OPEN_HARD_DISK_FILE 2 // Open the archive on HDD
179
+ #define SFILE_OPEN_CDROM_FILE 3 // Open the archive only if it is on CDROM
180
+
181
+ // Values for SFileOpenFile
182
+ #define SFILE_OPEN_FROM_MPQ 0x00000000 // Open the file from the MPQ archive
183
+ #define SFILE_OPEN_CHECK_EXISTS 0xFFFFFFFC // Only check whether the file exists
184
+ #define SFILE_OPEN_BASE_FILE 0xFFFFFFFD // Reserved for StormLib internal use
185
+ #define SFILE_OPEN_ANY_LOCALE 0xFFFFFFFE // Reserved for StormLib internal use
186
+ #define SFILE_OPEN_LOCAL_FILE 0xFFFFFFFF // Open a local file
187
+
188
+ // Flags for TMPQArchive::dwFlags. Used internally
189
+ #define MPQ_FLAG_READ_ONLY 0x00000001 // If set, the MPQ has been open for read-only access
190
+ #define MPQ_FLAG_CHANGED 0x00000002 // If set, the MPQ tables have been changed
191
+ #define MPQ_FLAG_MALFORMED 0x00000004 // Malformed data structure detected (W3M map protectors)
192
+ #define MPQ_FLAG_HASH_TABLE_CUT 0x00000008 // The hash table goes beyond EOF
193
+ #define MPQ_FLAG_BLOCK_TABLE_CUT 0x00000010 // The hash table goes beyond EOF
194
+ #define MPQ_FLAG_CHECK_SECTOR_CRC 0x00000020 // Checking sector CRC when reading files
195
+ #define MPQ_FLAG_SAVING_TABLES 0x00000040 // If set, we are saving MPQ internal files and MPQ tables
196
+ #define MPQ_FLAG_PATCH 0x00000080 // If set, this MPQ is a patch archive
197
+ #define MPQ_FLAG_STARCRAFT_BETA 0x00000100 // If set, this MPQ is from Starcraft I BETA
198
+ #define MPQ_FLAG_STARCRAFT 0x00000200 // If set, this MPQ is from Starcraft I
199
+ #define MPQ_FLAG_WAR3_MAP 0x00000400 // If set, this MPQ is a Warcraft III map
200
+ #define MPQ_FLAG_LISTFILE_NONE 0x00000800 // Set when no (listfile) was found in InvalidateInternalFiles
201
+ #define MPQ_FLAG_LISTFILE_NEW 0x00001000 // Set when (listfile) invalidated by InvalidateInternalFiles
202
+ #define MPQ_FLAG_LISTFILE_FORCE 0x00002000 // Save updated listfile on exit
203
+ #define MPQ_FLAG_ATTRIBUTES_NONE 0x00004000 // Set when no (attributes) was found in InvalidateInternalFiles
204
+ #define MPQ_FLAG_ATTRIBUTES_NEW 0x00008000 // Set when (attributes) invalidated by InvalidateInternalFiles
205
+ #define MPQ_FLAG_SIGNATURE_NONE 0x00010000 // Set when no (signature) was found in InvalidateInternalFiles
206
+ #define MPQ_FLAG_SIGNATURE_NEW 0x00020000 // Set when (signature) invalidated by InvalidateInternalFiles
207
+
208
+ // Values for TMPQArchive::dwSubType
209
+ #define MPQ_SUBTYPE_MPQ 0x00000000 // The file is a MPQ file (Blizzard games)
210
+ #define MPQ_SUBTYPE_SQP 0x00000001 // The file is a SQP file (War of the Immortals)
211
+ #define MPQ_SUBTYPE_MPK 0x00000002 // The file is a MPK file (Longwu Online)
212
+
213
+ // Return value for SFileGetFileSize and SFileSetFilePointer
214
+ #define SFILE_INVALID_SIZE 0xFFFFFFFF
215
+ #define SFILE_INVALID_POS 0xFFFFFFFF
216
+ #define SFILE_INVALID_ATTRIBUTES 0xFFFFFFFF
217
+
218
+ // Flags for TMPQBlock::dwFlags
219
+ #define MPQ_FILE_IMPLODE 0x00000100 // Implode method (By PKWARE Data Compression Library)
220
+ #define MPQ_FILE_COMPRESS 0x00000200 // Compress methods (By multiple methods)
221
+ #define MPQ_FILE_ENCRYPTED 0x00010000 // Indicates an encrypted file
222
+ #define MPQ_FILE_KEY_V2 0x00020000 // Indicates an encrypted file with key v2
223
+ #define MPQ_FILE_PATCH_FILE 0x00100000 // The file is a patch file. Raw file data begin with TPatchInfo structure
224
+ #define MPQ_FILE_SINGLE_UNIT 0x01000000 // File is stored as a single unit, rather than split into sectors (Thx, Quantam)
225
+ #define MPQ_FILE_DELETE_MARKER 0x02000000 // File is a deletion marker. Used in MPQ patches, indicating that the file no longer exists.
226
+ #define MPQ_FILE_SECTOR_CRC 0x04000000 // File has checksums for each sector.
227
+ // Ignored if file is not compressed or imploded.
228
+ #define MPQ_FILE_SIGNATURE 0x10000000 // Present on STANDARD.SNP\(signature). The only occurence ever observed
229
+ #define MPQ_FILE_EXISTS 0x80000000 // Set if file exists, reset when the file was deleted
230
+ #define MPQ_FILE_REPLACEEXISTING 0x80000000 // Replace when the file exist (SFileAddFile)
231
+
232
+ #define MPQ_FILE_COMPRESS_MASK 0x0000FF00 // Mask for a file being compressed
233
+
234
+ #define MPQ_FILE_DEFAULT_INTERNAL 0xFFFFFFFF // Use default flags for internal files
235
+
236
+ #define MPQ_FILE_FIX_KEY 0x00020000 // Obsolete, do not use
237
+
238
+ #define MPQ_FILE_VALID_FLAGS (MPQ_FILE_IMPLODE | \
239
+ MPQ_FILE_COMPRESS | \
240
+ MPQ_FILE_ENCRYPTED | \
241
+ MPQ_FILE_KEY_V2 | \
242
+ MPQ_FILE_PATCH_FILE | \
243
+ MPQ_FILE_SINGLE_UNIT | \
244
+ MPQ_FILE_DELETE_MARKER | \
245
+ MPQ_FILE_SECTOR_CRC | \
246
+ MPQ_FILE_SIGNATURE | \
247
+ MPQ_FILE_EXISTS)
248
+
249
+ #define MPQ_FILE_VALID_FLAGS_W3X (MPQ_FILE_IMPLODE | \
250
+ MPQ_FILE_COMPRESS | \
251
+ MPQ_FILE_ENCRYPTED | \
252
+ MPQ_FILE_KEY_V2 | \
253
+ MPQ_FILE_DELETE_MARKER | \
254
+ MPQ_FILE_SECTOR_CRC | \
255
+ MPQ_FILE_SIGNATURE | \
256
+ MPQ_FILE_EXISTS)
257
+
258
+ #define MPQ_FILE_VALID_FLAGS_SCX (MPQ_FILE_IMPLODE | \
259
+ MPQ_FILE_COMPRESS | \
260
+ MPQ_FILE_ENCRYPTED | \
261
+ MPQ_FILE_KEY_V2 | \
262
+ MPQ_FILE_EXISTS)
263
+
264
+ // Flags for TPatchInfo::dwFlags
265
+ #define MPQ_PATCH_INFO_VALID 0x80000000 // Set if the patch info is valid
266
+
267
+ // We need to mask out the upper 4 bits of the block table index.
268
+ // This is because it gets shifted out when calculating block table offset
269
+ // BlockTableOffset = pHash->dwBlockIndex << 0x04
270
+ // Malformed MPQ maps may contain block indexes like 0x40000001 or 0xF0000023
271
+ #define BLOCK_INDEX_MASK 0x0FFFFFFF
272
+ #define MPQ_BLOCK_INDEX(pHash) ((pHash)->dwBlockIndex & BLOCK_INDEX_MASK)
273
+
274
+ // Compression types for multiple compressions
275
+ #define MPQ_COMPRESSION_HUFFMANN 0x01 // Huffmann compression (used on WAVE files only)
276
+ #define MPQ_COMPRESSION_ZLIB 0x02 // ZLIB compression
277
+ #define MPQ_COMPRESSION_PKWARE 0x08 // PKWARE DCL compression
278
+ #define MPQ_COMPRESSION_BZIP2 0x10 // BZIP2 compression (added in Warcraft III)
279
+ #define MPQ_COMPRESSION_SPARSE 0x20 // Sparse compression (added in Starcraft 2)
280
+ #define MPQ_COMPRESSION_ADPCM_MONO 0x40 // IMA ADPCM compression (mono)
281
+ #define MPQ_COMPRESSION_ADPCM_STEREO 0x80 // IMA ADPCM compression (stereo)
282
+ #define MPQ_COMPRESSION_LZMA 0x12 // LZMA compression. Added in Starcraft 2. This value is NOT a combination of flags.
283
+ #define MPQ_COMPRESSION_NEXT_SAME 0xFFFFFFFF // Same compression
284
+
285
+ // Constants for SFileAddWave
286
+ #define MPQ_WAVE_QUALITY_HIGH 0 // Best quality, the worst compression
287
+ #define MPQ_WAVE_QUALITY_MEDIUM 1 // Medium quality, medium compression
288
+ #define MPQ_WAVE_QUALITY_LOW 2 // Low quality, the best compression
289
+
290
+ // Signatures for HET and BET table
291
+ #define HET_TABLE_SIGNATURE 0x1A544548 // 'HET\x1a'
292
+ #define BET_TABLE_SIGNATURE 0x1A544542 // 'BET\x1a'
293
+
294
+ // Decryption keys for MPQ tables
295
+ #define MPQ_KEY_HASH_TABLE 0xC3AF3770 // Obtained by HashString("(hash table)", MPQ_HASH_FILE_KEY)
296
+ #define MPQ_KEY_BLOCK_TABLE 0xEC83B3A3 // Obtained by HashString("(block table)", MPQ_HASH_FILE_KEY)
297
+
298
+ #define LISTFILE_NAME "(listfile)" // Name of internal listfile
299
+ #define SIGNATURE_NAME "(signature)" // Name of internal signature
300
+ #define ATTRIBUTES_NAME "(attributes)" // Name of internal attributes file
301
+ #define PATCH_METADATA_NAME "(patch_metadata)"
302
+
303
+ #define MPQ_FORMAT_VERSION_1 0 // Up to The Burning Crusade
304
+ #define MPQ_FORMAT_VERSION_2 1 // The Burning Crusade and newer
305
+ #define MPQ_FORMAT_VERSION_3 2 // WoW Cataclysm Beta
306
+ #define MPQ_FORMAT_VERSION_4 3 // WoW Cataclysm and newer
307
+
308
+ // Flags for MPQ attributes
309
+ #define MPQ_ATTRIBUTE_CRC32 0x00000001 // The "(attributes)" contains CRC32 for each file
310
+ #define MPQ_ATTRIBUTE_FILETIME 0x00000002 // The "(attributes)" contains file time for each file
311
+ #define MPQ_ATTRIBUTE_MD5 0x00000004 // The "(attributes)" contains MD5 for each file
312
+ #define MPQ_ATTRIBUTE_PATCH_BIT 0x00000008 // The "(attributes)" contains a patch bit for each file
313
+ #define MPQ_ATTRIBUTE_ALL 0x0000000F // Summary mask
314
+
315
+ #define MPQ_ATTRIBUTES_V1 100 // (attributes) format version 1.00
316
+
317
+ // Flags for SFileOpenArchive
318
+ #define BASE_PROVIDER_FILE 0x00000000 // Base data source is a file
319
+ #define BASE_PROVIDER_MAP 0x00000001 // Base data source is memory-mapped file
320
+ #define BASE_PROVIDER_HTTP 0x00000002 // Base data source is a file on web server
321
+ #define BASE_PROVIDER_MASK 0x0000000F // Mask for base provider value
322
+
323
+ #define STREAM_PROVIDER_FLAT 0x00000000 // Stream is linear with no offset mapping
324
+ #define STREAM_PROVIDER_PARTIAL 0x00000010 // Stream is partial file (.part)
325
+ #define STREAM_PROVIDER_MPQE 0x00000020 // Stream is an encrypted MPQ
326
+ #define STREAM_PROVIDER_BLOCK4 0x00000030 // 0x4000 per block, text MD5 after each block, max 0x2000 blocks per file
327
+ #define STREAM_PROVIDER_MASK 0x000000F0 // Mask for stream provider value
328
+
329
+ #define STREAM_FLAG_READ_ONLY 0x00000100 // Stream is read only
330
+ #define STREAM_FLAG_WRITE_SHARE 0x00000200 // Allow write sharing when open for write
331
+ #define STREAM_FLAG_USE_BITMAP 0x00000400 // If the file has a file bitmap, load it and use it
332
+ #define STREAM_OPTIONS_MASK 0x0000FF00 // Mask for stream options
333
+
334
+ #define STREAM_PROVIDERS_MASK 0x000000FF // Mask to get stream providers
335
+ #define STREAM_FLAGS_MASK 0x0000FFFF // Mask for all stream flags (providers+options)
336
+
337
+ #define MPQ_OPEN_NO_LISTFILE 0x00010000 // Don't load the internal listfile
338
+ #define MPQ_OPEN_NO_ATTRIBUTES 0x00020000 // Don't open the attributes
339
+ #define MPQ_OPEN_NO_HEADER_SEARCH 0x00040000 // Don't search for the MPQ header past the begin of the file
340
+ #define MPQ_OPEN_FORCE_MPQ_V1 0x00080000 // Always open the archive as MPQ v 1.00, ignore the "wFormatVersion" variable in the header
341
+ #define MPQ_OPEN_CHECK_SECTOR_CRC 0x00100000 // On files with MPQ_FILE_SECTOR_CRC, the CRC will be checked when reading file
342
+ #define MPQ_OPEN_PATCH 0x00200000 // This archive is a patch MPQ. Used internally.
343
+ #define MPQ_OPEN_FORCE_LISTFILE 0x00400000 // Force add listfile even if there is none at the moment of opening
344
+ #define MPQ_OPEN_READ_ONLY STREAM_FLAG_READ_ONLY
345
+
346
+ // Flags for SFileCreateArchive
347
+ #define MPQ_CREATE_LISTFILE 0x00100000 // Also add the (listfile) file
348
+ #define MPQ_CREATE_ATTRIBUTES 0x00200000 // Also add the (attributes) file
349
+ #define MPQ_CREATE_SIGNATURE 0x00400000 // Also add the (signature) file
350
+ #define MPQ_CREATE_ARCHIVE_V1 0x00000000 // Creates archive of version 1 (size up to 4GB)
351
+ #define MPQ_CREATE_ARCHIVE_V2 0x01000000 // Creates archive of version 2 (larger than 4 GB)
352
+ #define MPQ_CREATE_ARCHIVE_V3 0x02000000 // Creates archive of version 3
353
+ #define MPQ_CREATE_ARCHIVE_V4 0x03000000 // Creates archive of version 4
354
+ #define MPQ_CREATE_ARCHIVE_VMASK 0x0F000000 // Mask for archive version
355
+
356
+ #define FLAGS_TO_FORMAT_SHIFT 24 // (MPQ_CREATE_ARCHIVE_V4 >> FLAGS_TO_FORMAT_SHIFT) => MPQ_FORMAT_VERSION_4
357
+
358
+ // Flags for SFileVerifyFile
359
+ #define SFILE_VERIFY_SECTOR_CRC 0x00000001 // Verify sector checksum for the file, if available
360
+ #define SFILE_VERIFY_FILE_CRC 0x00000002 // Verify file CRC, if available
361
+ #define SFILE_VERIFY_FILE_MD5 0x00000004 // Verify file MD5, if available
362
+ #define SFILE_VERIFY_RAW_MD5 0x00000008 // Verify raw file MD5, if available
363
+ #define SFILE_VERIFY_ALL 0x0000000F // Verify every checksum possible
364
+
365
+ // Return values for SFileVerifyFile
366
+ #define VERIFY_OPEN_ERROR 0x0001 // Failed to open the file
367
+ #define VERIFY_READ_ERROR 0x0002 // Failed to read all data from the file
368
+ #define VERIFY_FILE_HAS_SECTOR_CRC 0x0004 // File has sector CRC
369
+ #define VERIFY_FILE_SECTOR_CRC_ERROR 0x0008 // Sector CRC check failed
370
+ #define VERIFY_FILE_HAS_CHECKSUM 0x0010 // File has CRC32
371
+ #define VERIFY_FILE_CHECKSUM_ERROR 0x0020 // CRC32 check failed
372
+ #define VERIFY_FILE_HAS_MD5 0x0040 // File has data MD5
373
+ #define VERIFY_FILE_MD5_ERROR 0x0080 // MD5 check failed
374
+ #define VERIFY_FILE_HAS_RAW_MD5 0x0100 // File has raw data MD5
375
+ #define VERIFY_FILE_RAW_MD5_ERROR 0x0200 // Raw MD5 check failed
376
+ #define VERIFY_FILE_ERROR_MASK (VERIFY_OPEN_ERROR | VERIFY_READ_ERROR | VERIFY_FILE_SECTOR_CRC_ERROR | VERIFY_FILE_CHECKSUM_ERROR | VERIFY_FILE_MD5_ERROR | VERIFY_FILE_RAW_MD5_ERROR)
377
+
378
+ // Flags for SFileVerifyRawData (for MPQs version 4.0 or higher)
379
+ #define SFILE_VERIFY_MPQ_HEADER 0x0001 // Verify raw MPQ header
380
+ #define SFILE_VERIFY_HET_TABLE 0x0002 // Verify raw data of the HET table
381
+ #define SFILE_VERIFY_BET_TABLE 0x0003 // Verify raw data of the BET table
382
+ #define SFILE_VERIFY_HASH_TABLE 0x0004 // Verify raw data of the hash table
383
+ #define SFILE_VERIFY_BLOCK_TABLE 0x0005 // Verify raw data of the block table
384
+ #define SFILE_VERIFY_HIBLOCK_TABLE 0x0006 // Verify raw data of the hi-block table
385
+ #define SFILE_VERIFY_FILE 0x0007 // Verify raw data of a file
386
+
387
+ // Signature types
388
+ #define SIGNATURE_TYPE_NONE 0x0000 // The archive has no signature in it
389
+ #define SIGNATURE_TYPE_WEAK 0x0001 // The archive has weak signature
390
+ #define SIGNATURE_TYPE_STRONG 0x0002 // The archive has strong signature
391
+
392
+ // Return values for SFileVerifyArchive
393
+ #define ERROR_NO_SIGNATURE 0 // There is no signature in the MPQ
394
+ #define ERROR_VERIFY_FAILED 1 // There was an error during verifying signature (like no memory)
395
+ #define ERROR_WEAK_SIGNATURE_OK 2 // There is a weak signature and sign check passed
396
+ #define ERROR_WEAK_SIGNATURE_ERROR 3 // There is a weak signature but sign check failed
397
+ #define ERROR_STRONG_SIGNATURE_OK 4 // There is a strong signature and sign check passed
398
+ #define ERROR_STRONG_SIGNATURE_ERROR 5 // There is a strong signature but sign check failed
399
+
400
+ #ifndef MD5_DIGEST_SIZE
401
+ #define MD5_DIGEST_SIZE 0x10
402
+ #endif
403
+
404
+ #ifndef SHA1_DIGEST_SIZE
405
+ #define SHA1_DIGEST_SIZE 0x14 // 160 bits
406
+ #endif
407
+
408
+ #ifndef LANG_NEUTRAL
409
+ #define LANG_NEUTRAL 0x00 // Neutral locale
410
+ #endif
411
+
412
+ // Pointer to hashing function
413
+ typedef DWORD (*HASH_STRING)(const char * szFileName, DWORD dwHashType);
414
+
415
+ //-----------------------------------------------------------------------------
416
+ // File information classes for SFileGetFileInfo and SFileFreeFileInfo
417
+
418
+ typedef enum _SFileInfoClass
419
+ {
420
+ // Info classes for archives
421
+ SFileMpqFileName, // Name of the archive file (TCHAR [])
422
+ SFileMpqStreamBitmap, // Array of bits, each bit means availability of one block (BYTE [])
423
+ SFileMpqUserDataOffset, // Offset of the user data header (ULONGLONG)
424
+ SFileMpqUserDataHeader, // Raw (unfixed) user data header (TMPQUserData)
425
+ SFileMpqUserData, // MPQ USer data, without the header (BYTE [])
426
+ SFileMpqHeaderOffset, // Offset of the MPQ header (ULONGLONG)
427
+ SFileMpqHeaderSize, // Fixed size of the MPQ header
428
+ SFileMpqHeader, // Raw (unfixed) archive header (TMPQHeader)
429
+ SFileMpqHetTableOffset, // Offset of the HET table, relative to MPQ header (ULONGLONG)
430
+ SFileMpqHetTableSize, // Compressed size of the HET table (ULONGLONG)
431
+ SFileMpqHetHeader, // HET table header (TMPQHetHeader)
432
+ SFileMpqHetTable, // HET table as pointer. Must be freed using SFileFreeFileInfo
433
+ SFileMpqBetTableOffset, // Offset of the BET table, relative to MPQ header (ULONGLONG)
434
+ SFileMpqBetTableSize, // Compressed size of the BET table (ULONGLONG)
435
+ SFileMpqBetHeader, // BET table header, followed by the flags (TMPQBetHeader + DWORD[])
436
+ SFileMpqBetTable, // BET table as pointer. Must be freed using SFileFreeFileInfo
437
+ SFileMpqHashTableOffset, // Hash table offset, relative to MPQ header (ULONGLONG)
438
+ SFileMpqHashTableSize64, // Compressed size of the hash table (ULONGLONG)
439
+ SFileMpqHashTableSize, // Size of the hash table, in entries (DWORD)
440
+ SFileMpqHashTable, // Raw (unfixed) hash table (TMPQBlock [])
441
+ SFileMpqBlockTableOffset, // Block table offset, relative to MPQ header (ULONGLONG)
442
+ SFileMpqBlockTableSize64, // Compressed size of the block table (ULONGLONG)
443
+ SFileMpqBlockTableSize, // Size of the block table, in entries (DWORD)
444
+ SFileMpqBlockTable, // Raw (unfixed) block table (TMPQBlock [])
445
+ SFileMpqHiBlockTableOffset, // Hi-block table offset, relative to MPQ header (ULONGLONG)
446
+ SFileMpqHiBlockTableSize64, // Compressed size of the hi-block table (ULONGLONG)
447
+ SFileMpqHiBlockTable, // The hi-block table (USHORT [])
448
+ SFileMpqSignatures, // Signatures present in the MPQ (DWORD)
449
+ SFileMpqStrongSignatureOffset, // Byte offset of the strong signature, relative to begin of the file (ULONGLONG)
450
+ SFileMpqStrongSignatureSize, // Size of the strong signature (DWORD)
451
+ SFileMpqStrongSignature, // The strong signature (BYTE [])
452
+ SFileMpqArchiveSize64, // Archive size from the header (ULONGLONG)
453
+ SFileMpqArchiveSize, // Archive size from the header (DWORD)
454
+ SFileMpqMaxFileCount, // Max number of files in the archive (DWORD)
455
+ SFileMpqFileTableSize, // Number of entries in the file table (DWORD)
456
+ SFileMpqSectorSize, // Sector size (DWORD)
457
+ SFileMpqNumberOfFiles, // Number of files (DWORD)
458
+ SFileMpqRawChunkSize, // Size of the raw data chunk for MD5
459
+ SFileMpqStreamFlags, // Stream flags (DWORD)
460
+ SFileMpqFlags, // Nonzero if the MPQ is read only (DWORD)
461
+
462
+ // Info classes for files
463
+ SFileInfoPatchChain, // Chain of patches where the file is (TCHAR [])
464
+ SFileInfoFileEntry, // The file entry for the file (TFileEntry)
465
+ SFileInfoHashEntry, // Hash table entry for the file (TMPQHash)
466
+ SFileInfoHashIndex, // Index of the hash table entry (DWORD)
467
+ SFileInfoNameHash1, // The first name hash in the hash table (DWORD)
468
+ SFileInfoNameHash2, // The second name hash in the hash table (DWORD)
469
+ SFileInfoNameHash3, // 64-bit file name hash for the HET/BET tables (ULONGLONG)
470
+ SFileInfoLocale, // File locale (DWORD)
471
+ SFileInfoFileIndex, // Block index (DWORD)
472
+ SFileInfoByteOffset, // File position in the archive (ULONGLONG)
473
+ SFileInfoFileTime, // File time (ULONGLONG)
474
+ SFileInfoFileSize, // Size of the file (DWORD)
475
+ SFileInfoCompressedSize, // Compressed file size (DWORD)
476
+ SFileInfoFlags, // File flags from (DWORD)
477
+ SFileInfoEncryptionKey, // File encryption key
478
+ SFileInfoEncryptionKeyRaw, // Unfixed value of the file key
479
+ SFileInfoCRC32, // CRC32 of the file
480
+
481
+ SFileInfoInvalid = 0xFFF, // Invalid file info class
482
+ } SFileInfoClass;
483
+
484
+ //-----------------------------------------------------------------------------
485
+ // Callback functions
486
+
487
+ // Values for compact callback
488
+ #define CCB_CHECKING_FILES 1 // Checking archive (dwParam1 = current, dwParam2 = total)
489
+ #define CCB_CHECKING_HASH_TABLE 2 // Checking hash table (dwParam1 = current, dwParam2 = total)
490
+ #define CCB_COPYING_NON_MPQ_DATA 3 // Copying non-MPQ data: No params used
491
+ #define CCB_COMPACTING_FILES 4 // Compacting archive (dwParam1 = current, dwParam2 = total)
492
+ #define CCB_CLOSING_ARCHIVE 5 // Closing archive: No params used
493
+
494
+ typedef void (WINAPI * SFILE_DOWNLOAD_CALLBACK)(void * pvUserData, ULONGLONG ByteOffset, DWORD dwTotalBytes);
495
+ typedef void (WINAPI * SFILE_ADDFILE_CALLBACK)(void * pvUserData, DWORD dwBytesWritten, DWORD dwTotalBytes, bool bFinalCall);
496
+ typedef void (WINAPI * SFILE_COMPACT_CALLBACK)(void * pvUserData, DWORD dwWorkType, ULONGLONG BytesProcessed, ULONGLONG TotalBytes);
497
+
498
+ typedef struct TFileStream TFileStream;
499
+ typedef struct TMPQBits TMPQBits;
500
+
501
+ //-----------------------------------------------------------------------------
502
+ // Structures related to MPQ format
503
+ //
504
+ // Note: All structures in this header file are supposed to remain private
505
+ // to StormLib. The structures may (and will) change over time, as the MPQ
506
+ // file format evolves. Programmers directly using these structures need to
507
+ // be aware of this. And the last, but not least, NEVER do any modifications
508
+ // to those structures directly, always use SFile* functions.
509
+ //
510
+
511
+ #define MPQ_HEADER_SIZE_V1 0x20
512
+ #define MPQ_HEADER_SIZE_V2 0x2C
513
+ #define MPQ_HEADER_SIZE_V3 0x44
514
+ #define MPQ_HEADER_SIZE_V4 0xD0
515
+ #define MPQ_HEADER_DWORDS (MPQ_HEADER_SIZE_V4 / 0x04)
516
+
517
+ typedef struct _TMPQUserData
518
+ {
519
+ // The ID_MPQ_USERDATA ('MPQ\x1B') signature
520
+ DWORD dwID;
521
+
522
+ // Maximum size of the user data
523
+ DWORD cbUserDataSize;
524
+
525
+ // Offset of the MPQ header, relative to the begin of this header
526
+ DWORD dwHeaderOffs;
527
+
528
+ // Appears to be size of user data header (Starcraft II maps)
529
+ DWORD cbUserDataHeader;
530
+ } TMPQUserData;
531
+
532
+ // MPQ file header
533
+ //
534
+ // We have to make sure that the header is packed OK.
535
+ // Reason: A 64-bit integer at the beginning of 3.0 part,
536
+ // which is offset 0x2C
537
+ #pragma pack(push, 1)
538
+ typedef struct _TMPQHeader
539
+ {
540
+ // The ID_MPQ ('MPQ\x1A') signature
541
+ DWORD dwID;
542
+
543
+ // Size of the archive header
544
+ DWORD dwHeaderSize;
545
+
546
+ // 32-bit size of MPQ archive
547
+ // This field is deprecated in the Burning Crusade MoPaQ format, and the size of the archive
548
+ // is calculated as the size from the beginning of the archive to the end of the hash table,
549
+ // block table, or hi-block table (whichever is largest).
550
+ DWORD dwArchiveSize;
551
+
552
+ // 0 = Format 1 (up to The Burning Crusade)
553
+ // 1 = Format 2 (The Burning Crusade and newer)
554
+ // 2 = Format 3 (WoW - Cataclysm beta or newer)
555
+ // 3 = Format 4 (WoW - Cataclysm beta or newer)
556
+ USHORT wFormatVersion;
557
+
558
+ // Power of two exponent specifying the number of 512-byte disk sectors in each file sector
559
+ // in the archive. The size of each file sector in the archive is 512 * 2 ^ wSectorSize.
560
+ USHORT wSectorSize;
561
+
562
+ // Offset to the beginning of the hash table, relative to the beginning of the archive.
563
+ DWORD dwHashTablePos;
564
+
565
+ // Offset to the beginning of the block table, relative to the beginning of the archive.
566
+ DWORD dwBlockTablePos;
567
+
568
+ // Number of entries in the hash table. Must be a power of two, and must be less than 2^16 for
569
+ // the original MoPaQ format, or less than 2^20 for the Burning Crusade format.
570
+ DWORD dwHashTableSize;
571
+
572
+ // Number of entries in the block table
573
+ DWORD dwBlockTableSize;
574
+
575
+ //-- MPQ HEADER v 2 -------------------------------------------
576
+
577
+ // Offset to the beginning of array of 16-bit high parts of file offsets.
578
+ ULONGLONG HiBlockTablePos64;
579
+
580
+ // High 16 bits of the hash table offset for large archives.
581
+ USHORT wHashTablePosHi;
582
+
583
+ // High 16 bits of the block table offset for large archives.
584
+ USHORT wBlockTablePosHi;
585
+
586
+ //-- MPQ HEADER v 3 -------------------------------------------
587
+
588
+ // 64-bit version of the archive size
589
+ ULONGLONG ArchiveSize64;
590
+
591
+ // 64-bit position of the BET table
592
+ ULONGLONG BetTablePos64;
593
+
594
+ // 64-bit position of the HET table
595
+ ULONGLONG HetTablePos64;
596
+
597
+ //-- MPQ HEADER v 4 -------------------------------------------
598
+
599
+ // Compressed size of the hash table
600
+ ULONGLONG HashTableSize64;
601
+
602
+ // Compressed size of the block table
603
+ ULONGLONG BlockTableSize64;
604
+
605
+ // Compressed size of the hi-block table
606
+ ULONGLONG HiBlockTableSize64;
607
+
608
+ // Compressed size of the HET block
609
+ ULONGLONG HetTableSize64;
610
+
611
+ // Compressed size of the BET block
612
+ ULONGLONG BetTableSize64;
613
+
614
+ // Size of raw data chunk to calculate MD5.
615
+ // MD5 of each data chunk follows the raw file data.
616
+ DWORD dwRawChunkSize;
617
+
618
+ // MD5 of MPQ tables
619
+ unsigned char MD5_BlockTable[MD5_DIGEST_SIZE]; // MD5 of the block table before decryption
620
+ unsigned char MD5_HashTable[MD5_DIGEST_SIZE]; // MD5 of the hash table before decryption
621
+ unsigned char MD5_HiBlockTable[MD5_DIGEST_SIZE]; // MD5 of the hi-block table
622
+ unsigned char MD5_BetTable[MD5_DIGEST_SIZE]; // MD5 of the BET table before decryption
623
+ unsigned char MD5_HetTable[MD5_DIGEST_SIZE]; // MD5 of the HET table before decryption
624
+ unsigned char MD5_MpqHeader[MD5_DIGEST_SIZE]; // MD5 of the MPQ header from signature to (including) MD5_HetTable
625
+ } TMPQHeader;
626
+ #pragma pack(pop)
627
+
628
+ // Hash table entry. All files in the archive are searched by their hashes.
629
+ typedef struct _TMPQHash
630
+ {
631
+ // The hash of the file path, using method A.
632
+ DWORD dwName1;
633
+
634
+ // The hash of the file path, using method B.
635
+ DWORD dwName2;
636
+
637
+ #ifdef STORMLIB_LITTLE_ENDIAN
638
+
639
+ // The language of the file. This is a Windows LANGID data type, and uses the same values.
640
+ // 0 indicates the default language (American English), or that the file is language-neutral.
641
+ USHORT Locale;
642
+
643
+ // The platform the file is used for. 0 indicates the default platform.
644
+ // No other values have been observed.
645
+ BYTE Platform;
646
+ BYTE Reserved;
647
+
648
+ #else
649
+
650
+ BYTE Reserved;
651
+ BYTE Platform;
652
+ USHORT Locale;
653
+
654
+ #endif
655
+
656
+ // If the hash table entry is valid, this is the index into the block table of the file.
657
+ // Otherwise, one of the following two values:
658
+ // - FFFFFFFFh: Hash table entry is empty, and has always been empty.
659
+ // Terminates searches for a given file.
660
+ // - FFFFFFFEh: Hash table entry is empty, but was valid at some point (a deleted file).
661
+ // Does not terminate searches for a given file.
662
+ DWORD dwBlockIndex;
663
+ } TMPQHash;
664
+
665
+ // File description block contains informations about the file
666
+ typedef struct _TMPQBlock
667
+ {
668
+ // Offset of the beginning of the file, relative to the beginning of the archive.
669
+ DWORD dwFilePos;
670
+
671
+ // Compressed file size
672
+ DWORD dwCSize;
673
+
674
+ // Only valid if the block is a file; otherwise meaningless, and should be 0.
675
+ // If the file is compressed, this is the size of the uncompressed file data.
676
+ DWORD dwFSize;
677
+
678
+ // Flags for the file. See MPQ_FILE_XXXX constants
679
+ DWORD dwFlags;
680
+ } TMPQBlock;
681
+
682
+ // Patch file information, preceding the sector offset table
683
+ typedef struct _TPatchInfo
684
+ {
685
+ DWORD dwLength; // Length of patch info header, in bytes
686
+ DWORD dwFlags; // Flags. 0x80000000 = valid (?)
687
+ DWORD dwDataSize; // Uncompressed size of the patch file
688
+ BYTE md5[0x10]; // MD5 of the entire patch file after decompression
689
+
690
+ // Followed by the sector table (variable length)
691
+ } TPatchInfo;
692
+
693
+ // This is the combined file entry for maintaining file list in the MPQ.
694
+ // This structure is combined from block table, hi-block table,
695
+ // (attributes) file and from (listfile).
696
+ typedef struct _TFileEntry
697
+ {
698
+ ULONGLONG FileNameHash; // Jenkins hash of the file name. Only used when the MPQ has BET table.
699
+ ULONGLONG ByteOffset; // Position of the file content in the MPQ, relative to the MPQ header
700
+ ULONGLONG FileTime; // FileTime from the (attributes) file. 0 if not present.
701
+ DWORD dwFileSize; // Decompressed size of the file
702
+ DWORD dwCmpSize; // Compressed size of the file (i.e., size of the file data in the MPQ)
703
+ DWORD dwFlags; // File flags (from block table)
704
+ DWORD dwCrc32; // CRC32 from (attributes) file. 0 if not present.
705
+ BYTE md5[MD5_DIGEST_SIZE]; // File MD5 from the (attributes) file. 0 if not present.
706
+ char * szFileName; // File name. NULL if not known.
707
+ } TFileEntry;
708
+
709
+ // Common header for HET and BET tables
710
+ typedef struct _TMPQExtHeader
711
+ {
712
+ DWORD dwSignature; // 'HET\x1A' or 'BET\x1A'
713
+ DWORD dwVersion; // Version. Seems to be always 1
714
+ DWORD dwDataSize; // Size of the contained table
715
+
716
+ // Followed by the table header
717
+ // Followed by the table data
718
+
719
+ } TMPQExtHeader;
720
+
721
+ // Structure for HET table header
722
+ typedef struct _TMPQHetHeader
723
+ {
724
+ TMPQExtHeader ExtHdr;
725
+
726
+ DWORD dwTableSize; // Size of the entire HET table, including HET_TABLE_HEADER (in bytes)
727
+ DWORD dwEntryCount; // Number of occupied entries in the HET table
728
+ DWORD dwTotalCount; // Total number of entries in the HET table
729
+ DWORD dwNameHashBitSize; // Size of the name hash entry (in bits)
730
+ DWORD dwIndexSizeTotal; // Total size of file index (in bits)
731
+ DWORD dwIndexSizeExtra; // Extra bits in the file index
732
+ DWORD dwIndexSize; // Effective size of the file index (in bits)
733
+ DWORD dwIndexTableSize; // Size of the block index subtable (in bytes)
734
+
735
+ } TMPQHetHeader;
736
+
737
+ // Structure for BET table header
738
+ typedef struct _TMPQBetHeader
739
+ {
740
+ TMPQExtHeader ExtHdr;
741
+
742
+ DWORD dwTableSize; // Size of the entire BET table, including the header (in bytes)
743
+ DWORD dwEntryCount; // Number of entries in the BET table. Must match HET_TABLE_HEADER::dwEntryCount
744
+ DWORD dwUnknown08;
745
+ DWORD dwTableEntrySize; // Size of one table entry (in bits)
746
+ DWORD dwBitIndex_FilePos; // Bit index of the file position (within the entry record)
747
+ DWORD dwBitIndex_FileSize; // Bit index of the file size (within the entry record)
748
+ DWORD dwBitIndex_CmpSize; // Bit index of the compressed size (within the entry record)
749
+ DWORD dwBitIndex_FlagIndex; // Bit index of the flag index (within the entry record)
750
+ DWORD dwBitIndex_Unknown; // Bit index of the ??? (within the entry record)
751
+ DWORD dwBitCount_FilePos; // Bit size of file position (in the entry record)
752
+ DWORD dwBitCount_FileSize; // Bit size of file size (in the entry record)
753
+ DWORD dwBitCount_CmpSize; // Bit size of compressed file size (in the entry record)
754
+ DWORD dwBitCount_FlagIndex; // Bit size of flags index (in the entry record)
755
+ DWORD dwBitCount_Unknown; // Bit size of ??? (in the entry record)
756
+ DWORD dwBitTotal_NameHash2; // Total bit size of the NameHash2
757
+ DWORD dwBitExtra_NameHash2; // Extra bits in the NameHash2
758
+ DWORD dwBitCount_NameHash2; // Effective size of NameHash2 (in bits)
759
+ DWORD dwNameHashArraySize; // Size of NameHash2 table, in bytes
760
+ DWORD dwFlagCount; // Number of flags in the following array
761
+
762
+ } TMPQBetHeader;
763
+
764
+ // Structure for parsed HET table
765
+ typedef struct _TMPQHetTable
766
+ {
767
+ TMPQBits * pBetIndexes; // Bit array of FileIndex values
768
+ LPBYTE pNameHashes; // Array of NameHash1 values (NameHash1 = upper 8 bits of FileName hashe)
769
+ ULONGLONG AndMask64; // AND mask used for calculating file name hash
770
+ ULONGLONG OrMask64; // OR mask used for setting the highest bit of the file name hash
771
+
772
+ DWORD dwEntryCount; // Number of occupied entries in the HET table
773
+ DWORD dwTotalCount; // Number of entries in both NameHash and FileIndex table
774
+ DWORD dwNameHashBitSize; // Size of the name hash entry (in bits)
775
+ DWORD dwIndexSizeTotal; // Total size of one entry in pBetIndexes (in bits)
776
+ DWORD dwIndexSizeExtra; // Extra bits in the entry in pBetIndexes
777
+ DWORD dwIndexSize; // Effective size of one entry in pBetIndexes (in bits)
778
+ } TMPQHetTable;
779
+
780
+ // Structure for parsed BET table
781
+ typedef struct _TMPQBetTable
782
+ {
783
+ TMPQBits * pNameHashes; // Array of NameHash2 entries (lower 24 bits of FileName hash)
784
+ TMPQBits * pFileTable; // Bit-based file table
785
+ LPDWORD pFileFlags; // Array of file flags
786
+
787
+ DWORD dwTableEntrySize; // Size of one table entry, in bits
788
+ DWORD dwBitIndex_FilePos; // Bit index of the file position in the table entry
789
+ DWORD dwBitIndex_FileSize; // Bit index of the file size in the table entry
790
+ DWORD dwBitIndex_CmpSize; // Bit index of the compressed size in the table entry
791
+ DWORD dwBitIndex_FlagIndex; // Bit index of the flag index in the table entry
792
+ DWORD dwBitIndex_Unknown; // Bit index of ??? in the table entry
793
+ DWORD dwBitCount_FilePos; // Size of file offset (in bits) within table entry
794
+ DWORD dwBitCount_FileSize; // Size of file size (in bits) within table entry
795
+ DWORD dwBitCount_CmpSize; // Size of compressed file size (in bits) within table entry
796
+ DWORD dwBitCount_FlagIndex; // Size of flag index (in bits) within table entry
797
+ DWORD dwBitCount_Unknown; // Size of ??? (in bits) within table entry
798
+ DWORD dwBitTotal_NameHash2; // Total size of the NameHash2
799
+ DWORD dwBitExtra_NameHash2; // Extra bits in the NameHash2
800
+ DWORD dwBitCount_NameHash2; // Effective size of the NameHash2
801
+ DWORD dwEntryCount; // Number of entries
802
+ DWORD dwFlagCount; // Number of file flags in pFileFlags
803
+ } TMPQBetTable;
804
+
805
+ // Structure for patch prefix
806
+ typedef struct _TMPQNamePrefix
807
+ {
808
+ size_t nLength; // Length of this patch prefix. Can be 0
809
+ char szPatchPrefix[1]; // Patch name prefix (variable length). If not empty, it always starts with backslash.
810
+ } TMPQNamePrefix;
811
+
812
+ // Structure for name cache
813
+ typedef struct _TMPQNameCache
814
+ {
815
+ DWORD FirstNameOffset; // Offset of the first name in the name list (in bytes)
816
+ DWORD FreeSpaceOffset; // Offset of the first free byte in the name cache (in bytes)
817
+ DWORD TotalCacheSize; // Size, in bytes, of the cache. Includes wildcard
818
+ DWORD SearchOffset; // Used by SListFileFindFirstFile
819
+
820
+ // Followed by search mask (ASCIIZ, '\0' if none)
821
+ // Followed by name cache (ANSI multistring)
822
+
823
+ } TMPQNameCache;
824
+
825
+ // Archive handle structure
826
+ typedef struct _TMPQArchive
827
+ {
828
+ TFileStream * pStream; // Open stream for the MPQ
829
+
830
+ ULONGLONG UserDataPos; // Position of user data (relative to the begin of the file)
831
+ ULONGLONG MpqPos; // MPQ header offset (relative to the begin of the file)
832
+ ULONGLONG FileSize; // Size of the file at the moment of file open
833
+ ULONGLONG FileOffsetMask; // 0xFFFFFFFF for MPQ v 1, otherwise 0xFFFFFFFFFFFFFFFFull
834
+
835
+ struct _TMPQArchive * haPatch; // Pointer to patch archive, if any
836
+ struct _TMPQArchive * haBase; // Pointer to base ("previous version") archive, if any
837
+ TMPQNamePrefix * pPatchPrefix; // Patch prefix to precede names of patch files
838
+
839
+ TMPQUserData * pUserData; // MPQ user data (NULL if not present in the file)
840
+ TMPQHeader * pHeader; // MPQ file header
841
+ TMPQHash * pHashTable; // Hash table
842
+ TMPQHetTable * pHetTable; // HET table
843
+ TFileEntry * pFileTable; // File table
844
+ HASH_STRING pfnHashString; // Hashing function that will convert the file name into hash
845
+
846
+ TMPQUserData UserData; // MPQ user data. Valid only when ID_MPQ_USERDATA has been found
847
+ DWORD HeaderData[MPQ_HEADER_DWORDS]; // Storage for MPQ header
848
+
849
+ DWORD dwHETBlockSize;
850
+ DWORD dwBETBlockSize;
851
+ DWORD dwMaxFileCount; // Maximum number of files in the MPQ. Also total size of the file table.
852
+ DWORD dwFileTableSize; // Current size of the file table, e.g. index of the entry past the last occupied one
853
+ DWORD dwReservedFiles; // Number of entries reserved for internal MPQ files (listfile, attributes)
854
+ DWORD dwSectorSize; // Default size of one file sector
855
+ DWORD dwFileFlags1; // Flags for (listfile)
856
+ DWORD dwFileFlags2; // Flags for (attributes)
857
+ DWORD dwFileFlags3; // Flags for (signature)
858
+ DWORD dwAttrFlags; // Flags for the (attributes) file, see MPQ_ATTRIBUTE_XXX
859
+ DWORD dwValidFileFlags; // Valid flags for the current MPQ
860
+ DWORD dwRealHashTableSize; // Real size of the hash table, if MPQ_FLAG_HASH_TABLE_CUT is zet in dwFlags
861
+ DWORD dwFlags; // See MPQ_FLAG_XXXXX
862
+ DWORD dwSubType; // See MPQ_SUBTYPE_XXX
863
+
864
+ SFILE_ADDFILE_CALLBACK pfnAddFileCB; // Callback function for adding files
865
+ void * pvAddFileUserData; // User data thats passed to the callback
866
+
867
+ SFILE_COMPACT_CALLBACK pfnCompactCB; // Callback function for compacting the archive
868
+ ULONGLONG CompactBytesProcessed; // Amount of bytes that have been processed during a particular compact call
869
+ ULONGLONG CompactTotalBytes; // Total amount of bytes to be compacted
870
+ void * pvCompactUserData; // User data thats passed to the callback
871
+ } TMPQArchive;
872
+
873
+ // File handle structure
874
+ typedef struct _TMPQFile
875
+ {
876
+ TFileStream * pStream; // File stream. Only used on local files
877
+ TMPQArchive * ha; // Archive handle
878
+ TMPQHash * pHashEntry; // Pointer to hash table entry, if the file was open using hash table
879
+ TFileEntry * pFileEntry; // File entry for the file
880
+ ULONGLONG RawFilePos; // Offset in MPQ archive (relative to file begin)
881
+ ULONGLONG MpqFilePos; // Offset in MPQ archive (relative to MPQ header)
882
+ DWORD dwHashIndex; // Hash table index (0xFFFFFFFF if not used)
883
+ DWORD dwFileKey; // Decryption key
884
+ DWORD dwFilePos; // Current file position
885
+ DWORD dwMagic; // 'FILE'
886
+
887
+ struct _TMPQFile * hfPatch; // Pointer to opened patch file
888
+
889
+ TPatchInfo * pPatchInfo; // Patch info block, preceding the sector table
890
+ LPDWORD SectorOffsets; // Position of each file sector, relative to the begin of the file. Only for compressed files.
891
+ LPDWORD SectorChksums; // Array of sector checksums (either ADLER32 or MD5) values for each file sector
892
+ LPBYTE pbFileData; // Data of the file (single unit files, patched files)
893
+ DWORD cbFileData; // Size of file data
894
+ DWORD dwCompression0; // Compression that will be used on the first file sector
895
+ DWORD dwSectorCount; // Number of sectors in the file
896
+ DWORD dwPatchedFileSize; // Size of patched file. Used when saving patch file to the MPQ
897
+ DWORD dwDataSize; // Size of data in the file (on patch files, this differs from file size in block table entry)
898
+
899
+ LPBYTE pbFileSector; // Last loaded file sector. For single unit files, entire file content
900
+ DWORD dwSectorOffs; // File position of currently loaded file sector
901
+ DWORD dwSectorSize; // Size of the file sector. For single unit files, this is equal to the file size
902
+
903
+ void * hctx; // Hash state for MD5. Used when saving file to MPQ
904
+ DWORD dwCrc32; // CRC32 value, used when saving file to MPQ
905
+
906
+ DWORD dwAddFileError; // Result of the "Add File" operations
907
+
908
+ bool bLoadedSectorCRCs; // If true, we already tried to load sector CRCs
909
+ bool bCheckSectorCRCs; // If true, then SFileReadFile will check sector CRCs when reading the file
910
+ bool bIsWriteHandle; // If true, this handle has been created by SFileCreateFile
911
+ } TMPQFile;
912
+
913
+ // Structure for SFileFindFirstFile and SFileFindNextFile
914
+ typedef struct _SFILE_FIND_DATA
915
+ {
916
+ char cFileName[MAX_PATH]; // Full name of the found file
917
+ char * szPlainName; // Plain name of the found file
918
+ DWORD dwHashIndex; // Hash table index for the file (HAH_ENTRY_FREE if no hash table)
919
+ DWORD dwBlockIndex; // Block table index for the file
920
+ DWORD dwFileSize; // File size in bytes
921
+ DWORD dwFileFlags; // MPQ file flags
922
+ DWORD dwCompSize; // Compressed file size
923
+ DWORD dwFileTimeLo; // Low 32-bits of the file time (0 if not present)
924
+ DWORD dwFileTimeHi; // High 32-bits of the file time (0 if not present)
925
+ LCID lcLocale; // Compound of file locale (16 bits) and platform (8 bits)
926
+
927
+ } SFILE_FIND_DATA, *PSFILE_FIND_DATA;
928
+
929
+ typedef struct _SFILE_CREATE_MPQ
930
+ {
931
+ DWORD cbSize; // Size of this structure, in bytes
932
+ DWORD dwMpqVersion; // Version of the MPQ to be created
933
+ void *pvUserData; // Reserved, must be NULL
934
+ DWORD cbUserData; // Reserved, must be 0
935
+ DWORD dwStreamFlags; // Stream flags for creating the MPQ
936
+ DWORD dwFileFlags1; // File flags for (listfile). Use MPQ_FILE_DEFAULT_INTERNAL to set default flags
937
+ DWORD dwFileFlags2; // File flags for (attributes). Use MPQ_FILE_DEFAULT_INTERNAL to set default flags
938
+ DWORD dwFileFlags3; // File flags for (signature). Use MPQ_FILE_DEFAULT_INTERNAL to set default flags
939
+ DWORD dwAttrFlags; // Flags for the (attributes) file. If 0, no attributes will be created
940
+ DWORD dwSectorSize; // Sector size for compressed files
941
+ DWORD dwRawChunkSize; // Size of raw data chunk
942
+ DWORD dwMaxFileCount; // File limit for the MPQ
943
+
944
+ } SFILE_CREATE_MPQ, *PSFILE_CREATE_MPQ;
945
+
946
+ typedef struct _SFILE_MARKERS
947
+ {
948
+ DWORD dwSize; // Size of this structure, in bytes
949
+ DWORD dwSignature; // Alternate MPQ header marker
950
+ const char * szHashTableKey; // Replacement for "(hash table)"
951
+ const char * szBlockTableKey; // Replacement for "(block table)"
952
+ } SFILE_MARKERS, *PSFILE_MARKERS;
953
+
954
+ //-----------------------------------------------------------------------------
955
+ // TMPQBits support - functions
956
+
957
+ void GetMPQBits(TMPQBits * pBits, unsigned int nBitPosition, unsigned int nBitLength, void * pvBuffer, int nResultByteSize);
958
+
959
+ //-----------------------------------------------------------------------------
960
+ // Stream support - functions
961
+
962
+ // Structure used by FileStream_GetBitmap
963
+ struct TStreamBitmap
964
+ {
965
+ ULONGLONG StreamSize; // Size of the stream, in bytes
966
+ DWORD BitmapSize; // Size of the block map, in bytes
967
+ DWORD BlockCount; // Number of blocks in the stream
968
+ DWORD BlockSize; // Size of one block
969
+ DWORD IsComplete; // Nonzero if the file is complete
970
+
971
+ // Followed by the BYTE array, each bit means availability of one block
972
+ };
973
+
974
+ // UNICODE versions of the file access functions
975
+ TFileStream * FileStream_CreateFile(const TCHAR * szFileName, DWORD dwStreamFlags);
976
+ TFileStream * FileStream_OpenFile(const TCHAR * szFileName, DWORD dwStreamFlags);
977
+ const TCHAR * FileStream_GetFileName(TFileStream * pStream);
978
+ size_t FileStream_Prefix(const TCHAR * szFileName, DWORD * pdwProvider);
979
+
980
+ bool FileStream_SetCallback(TFileStream * pStream, SFILE_DOWNLOAD_CALLBACK pfnCallback, void * pvUserData);
981
+
982
+ bool FileStream_GetBitmap(TFileStream * pStream, void * pvBitmap, DWORD cbBitmap, DWORD * pcbLengthNeeded);
983
+ bool FileStream_Read(TFileStream * pStream, ULONGLONG * pByteOffset, void * pvBuffer, DWORD dwBytesToRead);
984
+ bool FileStream_Write(TFileStream * pStream, ULONGLONG * pByteOffset, const void * pvBuffer, DWORD dwBytesToWrite);
985
+ bool FileStream_SetSize(TFileStream * pStream, ULONGLONG NewFileSize);
986
+ bool FileStream_GetSize(TFileStream * pStream, ULONGLONG * pFileSize);
987
+ bool FileStream_GetPos(TFileStream * pStream, ULONGLONG * pByteOffset);
988
+ bool FileStream_GetTime(TFileStream * pStream, ULONGLONG * pFT);
989
+ bool FileStream_GetFlags(TFileStream * pStream, LPDWORD pdwStreamFlags);
990
+ bool FileStream_Replace(TFileStream * pStream, TFileStream * pNewStream);
991
+ void FileStream_Close(TFileStream * pStream);
992
+
993
+ //-----------------------------------------------------------------------------
994
+ // Functions prototypes for Storm.dll
995
+
996
+ // Typedefs for functions exported by Storm.dll
997
+ typedef LCID (WINAPI * SFILESETLOCALE)(LCID);
998
+ typedef bool (WINAPI * SFILEOPENARCHIVE)(const char *, DWORD, DWORD, HANDLE *);
999
+ typedef bool (WINAPI * SFILECLOSEARCHIVE)(HANDLE);
1000
+ typedef bool (WINAPI * SFILEOPENFILEEX)(HANDLE, const char *, DWORD, HANDLE *);
1001
+ typedef bool (WINAPI * SFILECLOSEFILE)(HANDLE);
1002
+ typedef DWORD (WINAPI * SFILEGETFILESIZE)(HANDLE, LPDWORD);
1003
+ typedef DWORD (WINAPI * SFILESETFILEPOINTER)(HANDLE, LONG, LONG *, DWORD);
1004
+ typedef bool (WINAPI * SFILEREADFILE)(HANDLE, void *, DWORD, LPDWORD, LPOVERLAPPED);
1005
+
1006
+ //-----------------------------------------------------------------------------
1007
+ // Functions for manipulation with StormLib global flags
1008
+
1009
+ // Macros for making LCID from Locale and Platform
1010
+ #define SFILE_MAKE_LCID(locale, platform) ((LCID)(USHORT)locale | (LCID)(BYTE)platform << 0x10)
1011
+ #define SFILE_LOCALE(lcFileLocale) (USHORT)(lcFileLocale & 0xFFFF)
1012
+ #define SFILE_PLATFORM(lcFileLocale) (BYTE)(lcFileLocale >> 0x10)
1013
+
1014
+ // Alternate marker support. This is for MPQs masked as DLLs (*.asi), which
1015
+ // patch Storm.dll at runtime. Call before SFileOpenArchive
1016
+ bool WINAPI SFileSetArchiveMarkers(PSFILE_MARKERS pMarkers);
1017
+
1018
+ // Call before SFileOpenFileEx
1019
+ LCID WINAPI SFileGetLocale();
1020
+ LCID WINAPI SFileSetLocale(LCID lcFileLocale);
1021
+
1022
+ //-----------------------------------------------------------------------------
1023
+ // Functions for archive manipulation
1024
+
1025
+ bool WINAPI SFileOpenArchive(const TCHAR * szMpqName, DWORD dwPriority, DWORD dwFlags, HANDLE * phMpq);
1026
+ bool WINAPI SFileCreateArchive(const TCHAR * szMpqName, DWORD dwCreateFlags, DWORD dwMaxFileCount, HANDLE * phMpq);
1027
+ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCreateInfo, HANDLE * phMpq);
1028
+
1029
+ bool WINAPI SFileSetDownloadCallback(HANDLE hMpq, SFILE_DOWNLOAD_CALLBACK DownloadCB, void * pvUserData);
1030
+ bool WINAPI SFileFlushArchive(HANDLE hMpq);
1031
+ bool WINAPI SFileCloseArchive(HANDLE hMpq);
1032
+
1033
+ // Adds another listfile into MPQ. The currently added listfile(s) remain,
1034
+ // so you can use this API to combining more listfiles.
1035
+ // Note that this function is internally called by SFileFindFirstFile
1036
+ DWORD WINAPI SFileAddListFile(HANDLE hMpq, const TCHAR * szListFile);
1037
+ DWORD WINAPI SFileAddListFileEntries(HANDLE hMpq, const char ** listFileEntries, DWORD dwEntryCount);
1038
+
1039
+ // Archive compacting
1040
+ bool WINAPI SFileSetCompactCallback(HANDLE hMpq, SFILE_COMPACT_CALLBACK CompactCB, void * pvUserData);
1041
+ bool WINAPI SFileCompactArchive(HANDLE hMpq, const TCHAR * szListFile, bool bReserved);
1042
+
1043
+ // Changing the maximum file count
1044
+ DWORD WINAPI SFileGetMaxFileCount(HANDLE hMpq);
1045
+ bool WINAPI SFileSetMaxFileCount(HANDLE hMpq, DWORD dwMaxFileCount);
1046
+
1047
+ // Changing (attributes) file
1048
+ DWORD WINAPI SFileGetAttributes(HANDLE hMpq);
1049
+ bool WINAPI SFileSetAttributes(HANDLE hMpq, DWORD dwFlags);
1050
+ bool WINAPI SFileUpdateFileAttributes(HANDLE hMpq, const char * szFileName);
1051
+
1052
+ //-----------------------------------------------------------------------------
1053
+ // Functions for manipulation with patch archives
1054
+
1055
+ bool WINAPI SFileOpenPatchArchive(HANDLE hMpq, const TCHAR * szPatchMpqName, const char * szPatchPathPrefix, DWORD dwFlags);
1056
+ bool WINAPI SFileIsPatchedArchive(HANDLE hMpq);
1057
+
1058
+ //-----------------------------------------------------------------------------
1059
+ // Functions for file manipulation
1060
+
1061
+ // Reading from MPQ file
1062
+ bool WINAPI SFileHasFile(HANDLE hMpq, const char * szFileName);
1063
+ bool WINAPI SFileOpenFileEx(HANDLE hMpq, const char * szFileName, DWORD dwSearchScope, HANDLE * phFile);
1064
+ DWORD WINAPI SFileGetFileSize(HANDLE hFile, LPDWORD pdwFileSizeHigh);
1065
+ DWORD WINAPI SFileSetFilePointer(HANDLE hFile, LONG lFilePos, LONG * plFilePosHigh, DWORD dwMoveMethod);
1066
+ bool WINAPI SFileReadFile(HANDLE hFile, void * lpBuffer, DWORD dwToRead, LPDWORD pdwRead, LPOVERLAPPED lpOverlapped);
1067
+ bool WINAPI SFileCloseFile(HANDLE hFile);
1068
+
1069
+ // Retrieving info about a file in the archive
1070
+ bool WINAPI SFileGetFileInfo(HANDLE hMpqOrFile, SFileInfoClass InfoClass, void * pvFileInfo, DWORD cbFileInfo, LPDWORD pcbLengthNeeded);
1071
+ bool WINAPI SFileGetFileName(HANDLE hFile, char * szFileName);
1072
+ bool WINAPI SFileFreeFileInfo(void * pvFileInfo, SFileInfoClass InfoClass);
1073
+
1074
+ // High-level extract function
1075
+ bool WINAPI SFileExtractFile(HANDLE hMpq, const char * szToExtract, const TCHAR * szExtracted, DWORD dwSearchScope);
1076
+
1077
+ //-----------------------------------------------------------------------------
1078
+ // Functions for file and archive verification
1079
+
1080
+ // Generates file CRC32
1081
+ bool WINAPI SFileGetFileChecksums(HANDLE hMpq, const char * szFileName, LPDWORD pdwCrc32, char * pMD5);
1082
+
1083
+ // Verifies file against its checksums stored in (attributes) attributes (depending on dwFlags).
1084
+ // For dwFlags, use one or more of MPQ_ATTRIBUTE_MD5
1085
+ DWORD WINAPI SFileVerifyFile(HANDLE hMpq, const char * szFileName, DWORD dwFlags);
1086
+
1087
+ // Verifies raw data of the archive. Only works for MPQs version 4 or newer
1088
+ DWORD WINAPI SFileVerifyRawData(HANDLE hMpq, DWORD dwWhatToVerify, const char * szFileName);
1089
+
1090
+ // Verifies the signature, if present
1091
+ bool WINAPI SFileSignArchive(HANDLE hMpq, DWORD dwSignatureType);
1092
+ DWORD WINAPI SFileVerifyArchive(HANDLE hMpq);
1093
+
1094
+ //-----------------------------------------------------------------------------
1095
+ // Functions for file searching
1096
+
1097
+ HANDLE WINAPI SFileFindFirstFile(HANDLE hMpq, const char * szMask, SFILE_FIND_DATA * lpFindFileData, const TCHAR * szListFile);
1098
+ bool WINAPI SFileFindNextFile(HANDLE hFind, SFILE_FIND_DATA * lpFindFileData);
1099
+ bool WINAPI SFileFindClose(HANDLE hFind);
1100
+
1101
+ HANDLE WINAPI SListFileFindFirstFile(HANDLE hMpq, const TCHAR * szListFile, const char * szMask, SFILE_FIND_DATA * lpFindFileData);
1102
+ bool WINAPI SListFileFindNextFile(HANDLE hFind, SFILE_FIND_DATA * lpFindFileData);
1103
+ bool WINAPI SListFileFindClose(HANDLE hFind);
1104
+
1105
+ // Locale support
1106
+ DWORD WINAPI SFileEnumLocales(HANDLE hMpq, const char * szFileName, LCID * PtrFileLocales, LPDWORD PtrMaxLocales, DWORD dwSearchScope);
1107
+
1108
+ //-----------------------------------------------------------------------------
1109
+ // Support for adding files to the MPQ
1110
+
1111
+ bool WINAPI SFileCreateFile(HANDLE hMpq, const char * szArchivedName, ULONGLONG FileTime, DWORD dwFileSize, LCID lcFileLocale, DWORD dwFlags, HANDLE * phFile);
1112
+ bool WINAPI SFileWriteFile(HANDLE hFile, const void * pvData, DWORD dwSize, DWORD dwCompression);
1113
+ bool WINAPI SFileFinishFile(HANDLE hFile);
1114
+
1115
+ bool WINAPI SFileAddFileEx(HANDLE hMpq, const TCHAR * szFileName, const char * szArchivedName, DWORD dwFlags, DWORD dwCompression, DWORD dwCompressionNext);
1116
+ bool WINAPI SFileAddFile(HANDLE hMpq, const TCHAR * szFileName, const char * szArchivedName, DWORD dwFlags);
1117
+ bool WINAPI SFileAddWave(HANDLE hMpq, const TCHAR * szFileName, const char * szArchivedName, DWORD dwFlags, DWORD dwQuality);
1118
+ bool WINAPI SFileRemoveFile(HANDLE hMpq, const char * szFileName, DWORD dwSearchScope);
1119
+ bool WINAPI SFileRenameFile(HANDLE hMpq, const char * szOldFileName, const char * szNewFileName);
1120
+ bool WINAPI SFileSetFileLocale(HANDLE hFile, LCID lcNewLocale);
1121
+ bool WINAPI SFileSetDataCompression(DWORD DataCompression);
1122
+
1123
+ bool WINAPI SFileSetAddFileCallback(HANDLE hMpq, SFILE_ADDFILE_CALLBACK AddFileCB, void * pvUserData);
1124
+
1125
+ //-----------------------------------------------------------------------------
1126
+ // Compression and decompression
1127
+
1128
+ int WINAPI SCompImplode (void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, int cbInBuffer);
1129
+ int WINAPI SCompExplode (void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, int cbInBuffer);
1130
+ int WINAPI SCompCompress (void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, int cbInBuffer, unsigned uCompressionMask, int nCmpType, int nCmpLevel);
1131
+ int WINAPI SCompDecompress (void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, int cbInBuffer);
1132
+ int WINAPI SCompDecompress2(void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, int cbInBuffer);
1133
+
1134
+ //-----------------------------------------------------------------------------
1135
+ // Non-Windows support for SetLastError/GetLastError
1136
+
1137
+ #ifndef STORMLIB_WINDOWS
1138
+
1139
+ void SetLastError(DWORD dwErrCode);
1140
+ DWORD GetLastError();
1141
+
1142
+ #endif
1143
+
1144
+ //-----------------------------------------------------------------------------
1145
+ // Functions from Storm.dll. They use slightly different names for keeping
1146
+ // possibility to use them together with StormLib (StormXXX instead of SFileXXX)
1147
+
1148
+ #ifdef __LINK_STORM_DLL__
1149
+ #define STORM_ALTERNATE_NAMES // Force storm_dll.h to use alternate fnc names
1150
+ #include "..\storm_dll\storm_dll.h"
1151
+ #endif // __LINK_STORM_DLL__
1152
+
1153
+ #ifdef __cplusplus
1154
+ } // extern "C"
1155
+ #endif
1156
+
1157
+ #endif // __STORMLIB_H__