@awacloud/fw 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1057) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/LICENSE +176 -0
  3. package/NOTICE +12 -0
  4. package/README.md +355 -0
  5. package/dist/build/fw.core.pure.meta.json +29 -0
  6. package/dist/build/fw.core.pure.min.js +26 -0
  7. package/dist/build/fw.full.pure.meta.json +224 -0
  8. package/dist/build/fw.full.pure.min.js +60 -0
  9. package/dist/build/fw.minimal.pure.meta.json +21 -0
  10. package/dist/build/fw.minimal.pure.min.js +26 -0
  11. package/dist/build/fw.pack.compress-heavy.pure.meta.json +29 -0
  12. package/dist/build/fw.pack.compress-heavy.pure.min.js +8 -0
  13. package/dist/build/fw.pack.crypto-advanced.pure.meta.json +38 -0
  14. package/dist/build/fw.pack.crypto-advanced.pure.min.js +6 -0
  15. package/dist/build/fw.pack.crypto-basic.pure.meta.json +29 -0
  16. package/dist/build/fw.pack.crypto-basic.pure.min.js +6 -0
  17. package/dist/build/fw.pack.crypto-identity.pure.meta.json +29 -0
  18. package/dist/build/fw.pack.crypto-identity.pure.min.js +9 -0
  19. package/dist/build/fw.pack.realtime.pure.meta.json +21 -0
  20. package/dist/build/fw.pack.realtime.pure.min.js +6 -0
  21. package/dist/build/fw.pack.sensors.pure.meta.json +21 -0
  22. package/dist/build/fw.pack.sensors.pure.min.js +6 -0
  23. package/dist/build/fw.pack.structures-advanced.pure.meta.json +20 -0
  24. package/dist/build/fw.pack.structures-advanced.pure.min.js +6 -0
  25. package/dist/build/fw.pack.text-advanced.pure.meta.json +20 -0
  26. package/dist/build/fw.pack.text-advanced.pure.min.js +6 -0
  27. package/dist/build/fw.pwa.pure.meta.json +127 -0
  28. package/dist/build/fw.pwa.pure.min.js +55 -0
  29. package/dist/build/fw.site-interactive.pure.meta.json +81 -0
  30. package/dist/build/fw.site-interactive.pure.min.js +52 -0
  31. package/dist/build/fw.site.pure.meta.json +51 -0
  32. package/dist/build/fw.site.pure.min.js +35 -0
  33. package/dist/build/fw.spa.pure.meta.json +108 -0
  34. package/dist/build/fw.spa.pure.min.js +55 -0
  35. package/dist/build/io/compress/brotli_dict.bin +432 -0
  36. package/dist/build/sanity-base-classic.min.js +6 -0
  37. package/dist/build/sanity-community-classic.min.js +6 -0
  38. package/dist/build/sanity.min.js +6 -0
  39. package/dist/types/core/logger.d.ts +71 -0
  40. package/dist/types/core/logger.d.ts.map +1 -0
  41. package/dist/types/core/modules.d.ts +3962 -0
  42. package/dist/types/core/modules.d.ts.map +1 -0
  43. package/dist/types/core/readyState.d.ts +14 -0
  44. package/dist/types/core/readyState.d.ts.map +1 -0
  45. package/dist/types/core/runtime.d.ts +625 -0
  46. package/dist/types/core/runtime.d.ts.map +1 -0
  47. package/dist/types/core/worker-helper.d.ts +153 -0
  48. package/dist/types/core/worker-helper.d.ts.map +1 -0
  49. package/dist/types/crypto/cipher/aes.d.ts +55 -0
  50. package/dist/types/crypto/cipher/aes.d.ts.map +1 -0
  51. package/dist/types/crypto/cipher/chacha20.d.ts +33 -0
  52. package/dist/types/crypto/cipher/chacha20.d.ts.map +1 -0
  53. package/dist/types/crypto/hash/adf.d.ts +65 -0
  54. package/dist/types/crypto/hash/adf.d.ts.map +1 -0
  55. package/dist/types/crypto/hash/argon2.d.ts +79 -0
  56. package/dist/types/crypto/hash/argon2.d.ts.map +1 -0
  57. package/dist/types/crypto/hash/blake2b.d.ts +40 -0
  58. package/dist/types/crypto/hash/blake2b.d.ts.map +1 -0
  59. package/dist/types/crypto/hash/hkdf.d.ts +88 -0
  60. package/dist/types/crypto/hash/hkdf.d.ts.map +1 -0
  61. package/dist/types/crypto/hash/hmac.d.ts +85 -0
  62. package/dist/types/crypto/hash/hmac.d.ts.map +1 -0
  63. package/dist/types/crypto/hash/pbkdf2.d.ts +80 -0
  64. package/dist/types/crypto/hash/pbkdf2.d.ts.map +1 -0
  65. package/dist/types/crypto/hash/poly1305.d.ts +31 -0
  66. package/dist/types/crypto/hash/poly1305.d.ts.map +1 -0
  67. package/dist/types/crypto/hash/sha224.d.ts +80 -0
  68. package/dist/types/crypto/hash/sha224.d.ts.map +1 -0
  69. package/dist/types/crypto/hash/sha256.d.ts +82 -0
  70. package/dist/types/crypto/hash/sha256.d.ts.map +1 -0
  71. package/dist/types/crypto/hash/sha3.d.ts +111 -0
  72. package/dist/types/crypto/hash/sha3.d.ts.map +1 -0
  73. package/dist/types/crypto/hash/sha384.d.ts +84 -0
  74. package/dist/types/crypto/hash/sha384.d.ts.map +1 -0
  75. package/dist/types/crypto/hash/sha512.d.ts +87 -0
  76. package/dist/types/crypto/hash/sha512.d.ts.map +1 -0
  77. package/dist/types/crypto/hash/sha512_224.d.ts +84 -0
  78. package/dist/types/crypto/hash/sha512_224.d.ts.map +1 -0
  79. package/dist/types/crypto/hash/sha512_256.d.ts +84 -0
  80. package/dist/types/crypto/hash/sha512_256.d.ts.map +1 -0
  81. package/dist/types/crypto/mode/cbc.d.ts +38 -0
  82. package/dist/types/crypto/mode/cbc.d.ts.map +1 -0
  83. package/dist/types/crypto/mode/chacha20poly1305.d.ts +71 -0
  84. package/dist/types/crypto/mode/chacha20poly1305.d.ts.map +1 -0
  85. package/dist/types/crypto/mode/cmac.d.ts +56 -0
  86. package/dist/types/crypto/mode/cmac.d.ts.map +1 -0
  87. package/dist/types/crypto/mode/ctr.d.ts +52 -0
  88. package/dist/types/crypto/mode/ctr.d.ts.map +1 -0
  89. package/dist/types/crypto/mode/gcm.d.ts +88 -0
  90. package/dist/types/crypto/mode/gcm.d.ts.map +1 -0
  91. package/dist/types/crypto/mode/kw.d.ts +60 -0
  92. package/dist/types/crypto/mode/kw.d.ts.map +1 -0
  93. package/dist/types/crypto/pkc/ecc.d.ts +284 -0
  94. package/dist/types/crypto/pkc/ecc.d.ts.map +1 -0
  95. package/dist/types/crypto/pkc/ed25519.d.ts +107 -0
  96. package/dist/types/crypto/pkc/ed25519.d.ts.map +1 -0
  97. package/dist/types/crypto/pkc/hybridKem.d.ts +154 -0
  98. package/dist/types/crypto/pkc/hybridKem.d.ts.map +1 -0
  99. package/dist/types/crypto/pkc/hybridSign.d.ts +383 -0
  100. package/dist/types/crypto/pkc/hybridSign.d.ts.map +1 -0
  101. package/dist/types/crypto/pkc/ml_dsa.d.ts +174 -0
  102. package/dist/types/crypto/pkc/ml_dsa.d.ts.map +1 -0
  103. package/dist/types/crypto/pkc/ml_kem.d.ts +194 -0
  104. package/dist/types/crypto/pkc/ml_kem.d.ts.map +1 -0
  105. package/dist/types/crypto/pkc/rsa.d.ts +175 -0
  106. package/dist/types/crypto/pkc/rsa.d.ts.map +1 -0
  107. package/dist/types/crypto/pkc/slh_dsa.d.ts +232 -0
  108. package/dist/types/crypto/pkc/slh_dsa.d.ts.map +1 -0
  109. package/dist/types/crypto/pkc/x25519.d.ts +37 -0
  110. package/dist/types/crypto/pkc/x25519.d.ts.map +1 -0
  111. package/dist/types/crypto/utils/aes_ctr.d.ts +84 -0
  112. package/dist/types/crypto/utils/aes_ctr.d.ts.map +1 -0
  113. package/dist/types/crypto/utils/aes_modes.d.ts +128 -0
  114. package/dist/types/crypto/utils/aes_modes.d.ts.map +1 -0
  115. package/dist/types/crypto/utils/asn1-oid.d.ts +45 -0
  116. package/dist/types/crypto/utils/asn1-oid.d.ts.map +1 -0
  117. package/dist/types/crypto/utils/asn1.d.ts +115 -0
  118. package/dist/types/crypto/utils/asn1.d.ts.map +1 -0
  119. package/dist/types/crypto/utils/bitArray.d.ts +75 -0
  120. package/dist/types/crypto/utils/bitArray.d.ts.map +1 -0
  121. package/dist/types/crypto/utils/bn.d.ts +214 -0
  122. package/dist/types/crypto/utils/bn.d.ts.map +1 -0
  123. package/dist/types/crypto/utils/jws.d.ts +159 -0
  124. package/dist/types/crypto/utils/jws.d.ts.map +1 -0
  125. package/dist/types/crypto/utils/keyformat.d.ts +100 -0
  126. package/dist/types/crypto/utils/keyformat.d.ts.map +1 -0
  127. package/dist/types/crypto/utils/pad.d.ts +44 -0
  128. package/dist/types/crypto/utils/pad.d.ts.map +1 -0
  129. package/dist/types/crypto/utils/pem.d.ts +41 -0
  130. package/dist/types/crypto/utils/pem.d.ts.map +1 -0
  131. package/dist/types/crypto/utils/random.d.ts +203 -0
  132. package/dist/types/crypto/utils/random.d.ts.map +1 -0
  133. package/dist/types/crypto/utils/rsaKeygen.d.ts +162 -0
  134. package/dist/types/crypto/utils/rsaKeygen.d.ts.map +1 -0
  135. package/dist/types/crypto/utils/totp.d.ts +183 -0
  136. package/dist/types/crypto/utils/totp.d.ts.map +1 -0
  137. package/dist/types/crypto/utils/uuid.d.ts +29 -0
  138. package/dist/types/crypto/utils/uuid.d.ts.map +1 -0
  139. package/dist/types/crypto/wasm/aes.d.ts +59 -0
  140. package/dist/types/crypto/wasm/aes.d.ts.map +1 -0
  141. package/dist/types/crypto/wasm/argon2.d.ts +70 -0
  142. package/dist/types/crypto/wasm/argon2.d.ts.map +1 -0
  143. package/dist/types/crypto/wasm/blake2b.d.ts +59 -0
  144. package/dist/types/crypto/wasm/blake2b.d.ts.map +1 -0
  145. package/dist/types/crypto/wasm/chacha20poly1305.d.ts +43 -0
  146. package/dist/types/crypto/wasm/chacha20poly1305.d.ts.map +1 -0
  147. package/dist/types/crypto/wasm/cmac.d.ts +42 -0
  148. package/dist/types/crypto/wasm/cmac.d.ts.map +1 -0
  149. package/dist/types/crypto/wasm/ecc.d.ts +56 -0
  150. package/dist/types/crypto/wasm/ecc.d.ts.map +1 -0
  151. package/dist/types/crypto/wasm/ed25519.d.ts +52 -0
  152. package/dist/types/crypto/wasm/ed25519.d.ts.map +1 -0
  153. package/dist/types/crypto/wasm/hkdf.d.ts +40 -0
  154. package/dist/types/crypto/wasm/hkdf.d.ts.map +1 -0
  155. package/dist/types/crypto/wasm/hmac.d.ts +42 -0
  156. package/dist/types/crypto/wasm/hmac.d.ts.map +1 -0
  157. package/dist/types/crypto/wasm/ml_dsa.d.ts +48 -0
  158. package/dist/types/crypto/wasm/ml_dsa.d.ts.map +1 -0
  159. package/dist/types/crypto/wasm/ml_kem.d.ts +58 -0
  160. package/dist/types/crypto/wasm/ml_kem.d.ts.map +1 -0
  161. package/dist/types/crypto/wasm/pbkdf2.d.ts +38 -0
  162. package/dist/types/crypto/wasm/pbkdf2.d.ts.map +1 -0
  163. package/dist/types/crypto/wasm/rsa.d.ts +56 -0
  164. package/dist/types/crypto/wasm/rsa.d.ts.map +1 -0
  165. package/dist/types/crypto/wasm/runtime.d.ts +99 -0
  166. package/dist/types/crypto/wasm/runtime.d.ts.map +1 -0
  167. package/dist/types/crypto/wasm/sha2.d.ts +45 -0
  168. package/dist/types/crypto/wasm/sha2.d.ts.map +1 -0
  169. package/dist/types/crypto/wasm/sha3.d.ts +57 -0
  170. package/dist/types/crypto/wasm/sha3.d.ts.map +1 -0
  171. package/dist/types/crypto/wasm/slh_dsa.d.ts +62 -0
  172. package/dist/types/crypto/wasm/slh_dsa.d.ts.map +1 -0
  173. package/dist/types/crypto/wasm/x25519.d.ts +53 -0
  174. package/dist/types/crypto/wasm/x25519.d.ts.map +1 -0
  175. package/dist/types/crypto/webcrypto/aes.d.ts +59 -0
  176. package/dist/types/crypto/webcrypto/aes.d.ts.map +1 -0
  177. package/dist/types/crypto/webcrypto/aeskw.d.ts +40 -0
  178. package/dist/types/crypto/webcrypto/aeskw.d.ts.map +1 -0
  179. package/dist/types/crypto/webcrypto/digest.d.ts +43 -0
  180. package/dist/types/crypto/webcrypto/digest.d.ts.map +1 -0
  181. package/dist/types/crypto/webcrypto/ecc.d.ts +51 -0
  182. package/dist/types/crypto/webcrypto/ecc.d.ts.map +1 -0
  183. package/dist/types/crypto/webcrypto/ed25519.d.ts +43 -0
  184. package/dist/types/crypto/webcrypto/ed25519.d.ts.map +1 -0
  185. package/dist/types/crypto/webcrypto/hkdf.d.ts +18 -0
  186. package/dist/types/crypto/webcrypto/hkdf.d.ts.map +1 -0
  187. package/dist/types/crypto/webcrypto/hmac.d.ts +43 -0
  188. package/dist/types/crypto/webcrypto/hmac.d.ts.map +1 -0
  189. package/dist/types/crypto/webcrypto/pbkdf2.d.ts +18 -0
  190. package/dist/types/crypto/webcrypto/pbkdf2.d.ts.map +1 -0
  191. package/dist/types/crypto/webcrypto/rsa.d.ts +51 -0
  192. package/dist/types/crypto/webcrypto/rsa.d.ts.map +1 -0
  193. package/dist/types/crypto/webcrypto/x25519.d.ts +43 -0
  194. package/dist/types/crypto/webcrypto/x25519.d.ts.map +1 -0
  195. package/dist/types/dom/display/animate.d.ts +35 -0
  196. package/dist/types/dom/display/animate.d.ts.map +1 -0
  197. package/dist/types/dom/display/fullscreen.d.ts +59 -0
  198. package/dist/types/dom/display/fullscreen.d.ts.map +1 -0
  199. package/dist/types/dom/fs/download.d.ts +36 -0
  200. package/dist/types/dom/fs/download.d.ts.map +1 -0
  201. package/dist/types/dom/fs/fsAccess.d.ts +107 -0
  202. package/dist/types/dom/fs/fsAccess.d.ts.map +1 -0
  203. package/dist/types/dom/fs/indexedDB.d.ts +62 -0
  204. package/dist/types/dom/fs/indexedDB.d.ts.map +1 -0
  205. package/dist/types/dom/fs/remoteStore.d.ts +64 -0
  206. package/dist/types/dom/fs/remoteStore.d.ts.map +1 -0
  207. package/dist/types/dom/fs/storage.d.ts +56 -0
  208. package/dist/types/dom/fs/storage.d.ts.map +1 -0
  209. package/dist/types/dom/lifecycle/idle.d.ts +91 -0
  210. package/dist/types/dom/lifecycle/idle.d.ts.map +1 -0
  211. package/dist/types/dom/lifecycle/visibility.d.ts +49 -0
  212. package/dist/types/dom/lifecycle/visibility.d.ts.map +1 -0
  213. package/dist/types/dom/lifecycle/wakeLock.d.ts +69 -0
  214. package/dist/types/dom/lifecycle/wakeLock.d.ts.map +1 -0
  215. package/dist/types/dom/net/ajax.d.ts +27 -0
  216. package/dist/types/dom/net/ajax.d.ts.map +1 -0
  217. package/dist/types/dom/net/broadcastChannel.d.ts +51 -0
  218. package/dist/types/dom/net/broadcastChannel.d.ts.map +1 -0
  219. package/dist/types/dom/net/network.d.ts +80 -0
  220. package/dist/types/dom/net/network.d.ts.map +1 -0
  221. package/dist/types/dom/net/sse.d.ts +72 -0
  222. package/dist/types/dom/net/sse.d.ts.map +1 -0
  223. package/dist/types/dom/net/webrtc.d.ts +149 -0
  224. package/dist/types/dom/net/webrtc.d.ts.map +1 -0
  225. package/dist/types/dom/net/ws.d.ts +70 -0
  226. package/dist/types/dom/net/ws.d.ts.map +1 -0
  227. package/dist/types/dom/query/dnd.d.ts +86 -0
  228. package/dist/types/dom/query/dnd.d.ts.map +1 -0
  229. package/dist/types/dom/query/dom.d.ts +194 -0
  230. package/dist/types/dom/query/dom.d.ts.map +1 -0
  231. package/dist/types/dom/query/events.d.ts +135 -0
  232. package/dist/types/dom/query/events.d.ts.map +1 -0
  233. package/dist/types/dom/query/gesture.d.ts +59 -0
  234. package/dist/types/dom/query/gesture.d.ts.map +1 -0
  235. package/dist/types/dom/query/media.d.ts +156 -0
  236. package/dist/types/dom/query/media.d.ts.map +1 -0
  237. package/dist/types/dom/rendering/chart.d.ts +143 -0
  238. package/dist/types/dom/rendering/chart.d.ts.map +1 -0
  239. package/dist/types/dom/rendering/component.d.ts +92 -0
  240. package/dist/types/dom/rendering/component.d.ts.map +1 -0
  241. package/dist/types/dom/rendering/devtools-ui.d.ts +83 -0
  242. package/dist/types/dom/rendering/devtools-ui.d.ts.map +1 -0
  243. package/dist/types/dom/rendering/devtools.d.ts +68 -0
  244. package/dist/types/dom/rendering/devtools.d.ts.map +1 -0
  245. package/dist/types/dom/rendering/parser.d.ts +216 -0
  246. package/dist/types/dom/rendering/parser.d.ts.map +1 -0
  247. package/dist/types/dom/rendering/reactiveBind.d.ts +101 -0
  248. package/dist/types/dom/rendering/reactiveBind.d.ts.map +1 -0
  249. package/dist/types/dom/rendering/render.d.ts +121 -0
  250. package/dist/types/dom/rendering/render.d.ts.map +1 -0
  251. package/dist/types/dom/rendering/sanitize.d.ts +48 -0
  252. package/dist/types/dom/rendering/sanitize.d.ts.map +1 -0
  253. package/dist/types/dom/rendering/secPolicy.d.ts +89 -0
  254. package/dist/types/dom/rendering/secPolicy.d.ts.map +1 -0
  255. package/dist/types/dom/rendering/template.d.ts +251 -0
  256. package/dist/types/dom/rendering/template.d.ts.map +1 -0
  257. package/dist/types/dom/rendering/themeTokens.d.ts +61 -0
  258. package/dist/types/dom/rendering/themeTokens.d.ts.map +1 -0
  259. package/dist/types/dom/rendering/uiSession-core.d.ts +192 -0
  260. package/dist/types/dom/rendering/uiSession-core.d.ts.map +1 -0
  261. package/dist/types/dom/rendering/uiSession-direct.d.ts +63 -0
  262. package/dist/types/dom/rendering/uiSession-direct.d.ts.map +1 -0
  263. package/dist/types/dom/rendering/uiSession-list.d.ts +205 -0
  264. package/dist/types/dom/rendering/uiSession-list.d.ts.map +1 -0
  265. package/dist/types/dom/rendering/uiSession.d.ts +285 -0
  266. package/dist/types/dom/rendering/uiSession.d.ts.map +1 -0
  267. package/dist/types/dom/rendering/virtualScroll.d.ts +80 -0
  268. package/dist/types/dom/rendering/virtualScroll.d.ts.map +1 -0
  269. package/dist/types/dom/sensors/battery.d.ts +71 -0
  270. package/dist/types/dom/sensors/battery.d.ts.map +1 -0
  271. package/dist/types/dom/sensors/geolocation.d.ts +83 -0
  272. package/dist/types/dom/sensors/geolocation.d.ts.map +1 -0
  273. package/dist/types/dom/sensors/networkInfo.d.ts +82 -0
  274. package/dist/types/dom/sensors/networkInfo.d.ts.map +1 -0
  275. package/dist/types/dom/sensors/sensors.d.ts +191 -0
  276. package/dist/types/dom/sensors/sensors.d.ts.map +1 -0
  277. package/dist/types/dom/sw/backgroundSync.d.ts +48 -0
  278. package/dist/types/dom/sw/backgroundSync.d.ts.map +1 -0
  279. package/dist/types/dom/sw/cache.d.ts +71 -0
  280. package/dist/types/dom/sw/cache.d.ts.map +1 -0
  281. package/dist/types/dom/sw/push.d.ts +77 -0
  282. package/dist/types/dom/sw/push.d.ts.map +1 -0
  283. package/dist/types/dom/sw/serviceWorker.d.ts +57 -0
  284. package/dist/types/dom/sw/serviceWorker.d.ts.map +1 -0
  285. package/dist/types/dom/sw/sharedWorker.d.ts +81 -0
  286. package/dist/types/dom/sw/sharedWorker.d.ts.map +1 -0
  287. package/dist/types/dom/utils/a11y.d.ts +53 -0
  288. package/dist/types/dom/utils/a11y.d.ts.map +1 -0
  289. package/dist/types/dom/utils/clipboard.d.ts +44 -0
  290. package/dist/types/dom/utils/clipboard.d.ts.map +1 -0
  291. package/dist/types/dom/utils/entropyCollector.d.ts +58 -0
  292. package/dist/types/dom/utils/entropyCollector.d.ts.map +1 -0
  293. package/dist/types/dom/utils/focus.d.ts +123 -0
  294. package/dist/types/dom/utils/focus.d.ts.map +1 -0
  295. package/dist/types/dom/utils/form.d.ts +227 -0
  296. package/dist/types/dom/utils/form.d.ts.map +1 -0
  297. package/dist/types/dom/utils/formKit.d.ts +206 -0
  298. package/dist/types/dom/utils/formKit.d.ts.map +1 -0
  299. package/dist/types/dom/utils/keybindings.d.ts +53 -0
  300. package/dist/types/dom/utils/keybindings.d.ts.map +1 -0
  301. package/dist/types/dom/utils/leaderElection.d.ts +70 -0
  302. package/dist/types/dom/utils/leaderElection.d.ts.map +1 -0
  303. package/dist/types/dom/utils/notifications.d.ts +164 -0
  304. package/dist/types/dom/utils/notifications.d.ts.map +1 -0
  305. package/dist/types/dom/utils/permissions.d.ts +35 -0
  306. package/dist/types/dom/utils/permissions.d.ts.map +1 -0
  307. package/dist/types/dom/utils/route.d.ts +117 -0
  308. package/dist/types/dom/utils/route.d.ts.map +1 -0
  309. package/dist/types/dom/utils/ua.d.ts +35 -0
  310. package/dist/types/dom/utils/ua.d.ts.map +1 -0
  311. package/dist/types/dom/utils/webauthn.d.ts +98 -0
  312. package/dist/types/dom/utils/webauthn.d.ts.map +1 -0
  313. package/dist/types/io/binary/reader.d.ts +59 -0
  314. package/dist/types/io/binary/reader.d.ts.map +1 -0
  315. package/dist/types/io/binary/writer.d.ts +56 -0
  316. package/dist/types/io/binary/writer.d.ts.map +1 -0
  317. package/dist/types/io/calc/adler32.d.ts +31 -0
  318. package/dist/types/io/calc/adler32.d.ts.map +1 -0
  319. package/dist/types/io/calc/bigint.d.ts +74 -0
  320. package/dist/types/io/calc/bigint.d.ts.map +1 -0
  321. package/dist/types/io/calc/crc32.d.ts +36 -0
  322. package/dist/types/io/calc/crc32.d.ts.map +1 -0
  323. package/dist/types/io/calc/easing.d.ts +60 -0
  324. package/dist/types/io/calc/easing.d.ts.map +1 -0
  325. package/dist/types/io/codec/b64.d.ts +28 -0
  326. package/dist/types/io/codec/b64.d.ts.map +1 -0
  327. package/dist/types/io/codec/base32.d.ts +28 -0
  328. package/dist/types/io/codec/base32.d.ts.map +1 -0
  329. package/dist/types/io/codec/base58.d.ts +28 -0
  330. package/dist/types/io/codec/base58.d.ts.map +1 -0
  331. package/dist/types/io/codec/buffer.d.ts +66 -0
  332. package/dist/types/io/codec/buffer.d.ts.map +1 -0
  333. package/dist/types/io/codec/cbor.d.ts +43 -0
  334. package/dist/types/io/codec/cbor.d.ts.map +1 -0
  335. package/dist/types/io/codec/csv.d.ts +35 -0
  336. package/dist/types/io/codec/csv.d.ts.map +1 -0
  337. package/dist/types/io/codec/hex.d.ts +28 -0
  338. package/dist/types/io/codec/hex.d.ts.map +1 -0
  339. package/dist/types/io/codec/mime.d.ts +100 -0
  340. package/dist/types/io/codec/mime.d.ts.map +1 -0
  341. package/dist/types/io/codec/msgpack.d.ts +36 -0
  342. package/dist/types/io/codec/msgpack.d.ts.map +1 -0
  343. package/dist/types/io/codec/url.d.ts +52 -0
  344. package/dist/types/io/codec/url.d.ts.map +1 -0
  345. package/dist/types/io/codec/utf8.d.ts +22 -0
  346. package/dist/types/io/codec/utf8.d.ts.map +1 -0
  347. package/dist/types/io/codec/xml.d.ts +91 -0
  348. package/dist/types/io/codec/xml.d.ts.map +1 -0
  349. package/dist/types/io/compress/bitstream.d.ts +51 -0
  350. package/dist/types/io/compress/bitstream.d.ts.map +1 -0
  351. package/dist/types/io/compress/brotli.d.ts +86 -0
  352. package/dist/types/io/compress/brotli.d.ts.map +1 -0
  353. package/dist/types/io/compress/brotli_dict.d.ts +76 -0
  354. package/dist/types/io/compress/brotli_dict.d.ts.map +1 -0
  355. package/dist/types/io/compress/brotli_dict_words.d.ts +43 -0
  356. package/dist/types/io/compress/brotli_dict_words.d.ts.map +1 -0
  357. package/dist/types/io/compress/brotli_frame.d.ts +166 -0
  358. package/dist/types/io/compress/brotli_frame.d.ts.map +1 -0
  359. package/dist/types/io/compress/brotli_shared.d.ts +165 -0
  360. package/dist/types/io/compress/brotli_shared.d.ts.map +1 -0
  361. package/dist/types/io/compress/deflate.d.ts +89 -0
  362. package/dist/types/io/compress/deflate.d.ts.map +1 -0
  363. package/dist/types/io/compress/gzip.d.ts +100 -0
  364. package/dist/types/io/compress/gzip.d.ts.map +1 -0
  365. package/dist/types/io/compress/huffman.d.ts +37 -0
  366. package/dist/types/io/compress/huffman.d.ts.map +1 -0
  367. package/dist/types/io/compress/lz4.d.ts +45 -0
  368. package/dist/types/io/compress/lz4.d.ts.map +1 -0
  369. package/dist/types/io/compress/lz77.d.ts +66 -0
  370. package/dist/types/io/compress/lz77.d.ts.map +1 -0
  371. package/dist/types/io/compress/lzw.d.ts +37 -0
  372. package/dist/types/io/compress/lzw.d.ts.map +1 -0
  373. package/dist/types/io/compress/zip.d.ts +112 -0
  374. package/dist/types/io/compress/zip.d.ts.map +1 -0
  375. package/dist/types/io/compress/zlib.d.ts +97 -0
  376. package/dist/types/io/compress/zlib.d.ts.map +1 -0
  377. package/dist/types/io/i18n/i18n.d.ts +64 -0
  378. package/dist/types/io/i18n/i18n.d.ts.map +1 -0
  379. package/dist/types/io/math/fixed-point.d.ts +30 -0
  380. package/dist/types/io/math/fixed-point.d.ts.map +1 -0
  381. package/dist/types/io/math/geom.d.ts +125 -0
  382. package/dist/types/io/math/geom.d.ts.map +1 -0
  383. package/dist/types/io/math/interp.d.ts +48 -0
  384. package/dist/types/io/math/interp.d.ts.map +1 -0
  385. package/dist/types/io/math/linalg.d.ts +117 -0
  386. package/dist/types/io/math/linalg.d.ts.map +1 -0
  387. package/dist/types/io/math/stats.d.ts +45 -0
  388. package/dist/types/io/math/stats.d.ts.map +1 -0
  389. package/dist/types/io/structures/btree.d.ts +84 -0
  390. package/dist/types/io/structures/btree.d.ts.map +1 -0
  391. package/dist/types/io/structures/heap.d.ts +75 -0
  392. package/dist/types/io/structures/heap.d.ts.map +1 -0
  393. package/dist/types/io/structures/lruCache.d.ts +88 -0
  394. package/dist/types/io/structures/lruCache.d.ts.map +1 -0
  395. package/dist/types/io/structures/ringBuffer.d.ts +82 -0
  396. package/dist/types/io/structures/ringBuffer.d.ts.map +1 -0
  397. package/dist/types/io/structures/tree-walker.d.ts +95 -0
  398. package/dist/types/io/structures/tree-walker.d.ts.map +1 -0
  399. package/dist/types/io/structures/trie.d.ts +71 -0
  400. package/dist/types/io/structures/trie.d.ts.map +1 -0
  401. package/dist/types/io/sync/abort.d.ts +59 -0
  402. package/dist/types/io/sync/abort.d.ts.map +1 -0
  403. package/dist/types/io/sync/atomics.d.ts +107 -0
  404. package/dist/types/io/sync/atomics.d.ts.map +1 -0
  405. package/dist/types/io/sync/cancellable.d.ts +69 -0
  406. package/dist/types/io/sync/cancellable.d.ts.map +1 -0
  407. package/dist/types/io/sync/channel.d.ts +70 -0
  408. package/dist/types/io/sync/channel.d.ts.map +1 -0
  409. package/dist/types/io/sync/mutex.d.ts +39 -0
  410. package/dist/types/io/sync/mutex.d.ts.map +1 -0
  411. package/dist/types/io/sync/semaphore.d.ts +40 -0
  412. package/dist/types/io/sync/semaphore.d.ts.map +1 -0
  413. package/dist/types/io/sync/tokenBucket.d.ts +53 -0
  414. package/dist/types/io/sync/tokenBucket.d.ts.map +1 -0
  415. package/dist/types/io/text/ansi.d.ts +125 -0
  416. package/dist/types/io/text/ansi.d.ts.map +1 -0
  417. package/dist/types/io/text/html-entities.d.ts +35 -0
  418. package/dist/types/io/text/html-entities.d.ts.map +1 -0
  419. package/dist/types/io/text/semver.d.ts +75 -0
  420. package/dist/types/io/text/semver.d.ts.map +1 -0
  421. package/dist/types/io/text/str.d.ts +88 -0
  422. package/dist/types/io/text/str.d.ts.map +1 -0
  423. package/dist/types/io/text/unicode.d.ts +70 -0
  424. package/dist/types/io/text/unicode.d.ts.map +1 -0
  425. package/dist/types/io/time/date.d.ts +73 -0
  426. package/dist/types/io/time/date.d.ts.map +1 -0
  427. package/dist/types/io/timing/clock.d.ts +39 -0
  428. package/dist/types/io/timing/clock.d.ts.map +1 -0
  429. package/dist/types/io/timing/rateLimit.d.ts +40 -0
  430. package/dist/types/io/timing/rateLimit.d.ts.map +1 -0
  431. package/dist/types/io/timing/scheduler.d.ts +122 -0
  432. package/dist/types/io/timing/scheduler.d.ts.map +1 -0
  433. package/dist/types/io/utils/bitmap.d.ts +34 -0
  434. package/dist/types/io/utils/bitmap.d.ts.map +1 -0
  435. package/dist/types/io/utils/errors.d.ts +94 -0
  436. package/dist/types/io/utils/errors.d.ts.map +1 -0
  437. package/dist/types/io/utils/eventBus.d.ts +68 -0
  438. package/dist/types/io/utils/eventBus.d.ts.map +1 -0
  439. package/dist/types/io/utils/queue.d.ts +69 -0
  440. package/dist/types/io/utils/queue.d.ts.map +1 -0
  441. package/dist/types/io/utils/signal.d.ts +362 -0
  442. package/dist/types/io/utils/signal.d.ts.map +1 -0
  443. package/dist/types/io/utils/ui8.d.ts +34 -0
  444. package/dist/types/io/utils/ui8.d.ts.map +1 -0
  445. package/dist/types/io/utils/valid.d.ts +130 -0
  446. package/dist/types/io/utils/valid.d.ts.map +1 -0
  447. package/dist/types/main.d.ts +25 -0
  448. package/dist/types/main.d.ts.map +1 -0
  449. package/dist/types/process/message.d.ts +64 -0
  450. package/dist/types/process/message.d.ts.map +1 -0
  451. package/dist/types/process/rpc.d.ts +35 -0
  452. package/dist/types/process/rpc.d.ts.map +1 -0
  453. package/dist/types/process/workerPool.d.ts +62 -0
  454. package/dist/types/process/workerPool.d.ts.map +1 -0
  455. package/dist/types/sanity/base.d.ts +28 -0
  456. package/dist/types/sanity/base.d.ts.map +1 -0
  457. package/dist/types/sanity/community.d.ts +20 -0
  458. package/dist/types/sanity/community.d.ts.map +1 -0
  459. package/dist/types/sanity/lockdown-apply.d.ts +7 -0
  460. package/dist/types/sanity/lockdown-apply.d.ts.map +1 -0
  461. package/dist/types/sanity/lockdown.d.ts +43 -0
  462. package/dist/types/sanity/lockdown.d.ts.map +1 -0
  463. package/dist/types/sanity/wasm-gate.d.ts +128 -0
  464. package/dist/types/sanity/wasm-gate.d.ts.map +1 -0
  465. package/docs/README.md +301 -0
  466. package/docs/api/README.md +33 -0
  467. package/docs/api/core/README.md +14 -0
  468. package/docs/api/core/logger.md +151 -0
  469. package/docs/api/core/main.md +105 -0
  470. package/docs/api/core/modules.md +123 -0
  471. package/docs/api/core/readyState.md +94 -0
  472. package/docs/api/core/runtime.md +499 -0
  473. package/docs/api/core/worker-helper.md +180 -0
  474. package/docs/api/crypto/README.md +39 -0
  475. package/docs/api/crypto/cipher/README.md +24 -0
  476. package/docs/api/crypto/cipher/aes.md +101 -0
  477. package/docs/api/crypto/cipher/chacha20.md +85 -0
  478. package/docs/api/crypto/hash/README.md +49 -0
  479. package/docs/api/crypto/hash/adf.md +61 -0
  480. package/docs/api/crypto/hash/argon2.md +92 -0
  481. package/docs/api/crypto/hash/blake2b.md +88 -0
  482. package/docs/api/crypto/hash/hkdf.md +82 -0
  483. package/docs/api/crypto/hash/hmac.md +90 -0
  484. package/docs/api/crypto/hash/pbkdf2.md +93 -0
  485. package/docs/api/crypto/hash/poly1305.md +71 -0
  486. package/docs/api/crypto/hash/sha224.md +61 -0
  487. package/docs/api/crypto/hash/sha256.md +84 -0
  488. package/docs/api/crypto/hash/sha3.md +89 -0
  489. package/docs/api/crypto/hash/sha384.md +58 -0
  490. package/docs/api/crypto/hash/sha512.md +73 -0
  491. package/docs/api/crypto/hash/sha512_224.md +59 -0
  492. package/docs/api/crypto/hash/sha512_256.md +58 -0
  493. package/docs/api/crypto/mode/README.md +33 -0
  494. package/docs/api/crypto/mode/cbc.md +69 -0
  495. package/docs/api/crypto/mode/chacha20poly1305.md +77 -0
  496. package/docs/api/crypto/mode/cmac.md +79 -0
  497. package/docs/api/crypto/mode/ctr.md +66 -0
  498. package/docs/api/crypto/mode/gcm.md +93 -0
  499. package/docs/api/crypto/mode/kw.md +84 -0
  500. package/docs/api/crypto/pkc/README.md +48 -0
  501. package/docs/api/crypto/pkc/ecc.md +91 -0
  502. package/docs/api/crypto/pkc/ed25519.md +99 -0
  503. package/docs/api/crypto/pkc/hybridKem.md +178 -0
  504. package/docs/api/crypto/pkc/hybridSign.md +192 -0
  505. package/docs/api/crypto/pkc/ml_dsa.md +99 -0
  506. package/docs/api/crypto/pkc/ml_kem.md +90 -0
  507. package/docs/api/crypto/pkc/rsa.md +87 -0
  508. package/docs/api/crypto/pkc/slh_dsa.md +86 -0
  509. package/docs/api/crypto/pkc/x25519.md +84 -0
  510. package/docs/api/crypto/utils/README.md +39 -0
  511. package/docs/api/crypto/utils/aes_ctr.md +71 -0
  512. package/docs/api/crypto/utils/aes_modes.md +81 -0
  513. package/docs/api/crypto/utils/asn1-oid.md +130 -0
  514. package/docs/api/crypto/utils/asn1.md +69 -0
  515. package/docs/api/crypto/utils/bitArray.md +77 -0
  516. package/docs/api/crypto/utils/bn.md +67 -0
  517. package/docs/api/crypto/utils/jws.md +94 -0
  518. package/docs/api/crypto/utils/keyformat.md +78 -0
  519. package/docs/api/crypto/utils/pad.md +66 -0
  520. package/docs/api/crypto/utils/pem.md +63 -0
  521. package/docs/api/crypto/utils/random.md +103 -0
  522. package/docs/api/crypto/utils/rsaKeygen.md +118 -0
  523. package/docs/api/crypto/utils/totp.md +159 -0
  524. package/docs/api/crypto/utils/uuid.md +98 -0
  525. package/docs/api/crypto/wasm/README.md +76 -0
  526. package/docs/api/crypto/wasm/aes.md +128 -0
  527. package/docs/api/crypto/wasm/argon2.md +110 -0
  528. package/docs/api/crypto/wasm/blake2b.md +103 -0
  529. package/docs/api/crypto/wasm/chacha20poly1305.md +120 -0
  530. package/docs/api/crypto/wasm/cmac.md +119 -0
  531. package/docs/api/crypto/wasm/ecc.md +114 -0
  532. package/docs/api/crypto/wasm/ed25519.md +117 -0
  533. package/docs/api/crypto/wasm/hkdf.md +163 -0
  534. package/docs/api/crypto/wasm/hmac.md +129 -0
  535. package/docs/api/crypto/wasm/ml_dsa.md +99 -0
  536. package/docs/api/crypto/wasm/ml_kem.md +91 -0
  537. package/docs/api/crypto/wasm/pbkdf2.md +111 -0
  538. package/docs/api/crypto/wasm/rsa.md +113 -0
  539. package/docs/api/crypto/wasm/runtime.md +172 -0
  540. package/docs/api/crypto/wasm/sha2.md +95 -0
  541. package/docs/api/crypto/wasm/sha3.md +127 -0
  542. package/docs/api/crypto/wasm/slh_dsa.md +89 -0
  543. package/docs/api/crypto/wasm/x25519.md +116 -0
  544. package/docs/api/crypto/webcrypto/README.md +56 -0
  545. package/docs/api/crypto/webcrypto/aes.md +140 -0
  546. package/docs/api/crypto/webcrypto/aeskw.md +120 -0
  547. package/docs/api/crypto/webcrypto/digest.md +103 -0
  548. package/docs/api/crypto/webcrypto/ecc.md +122 -0
  549. package/docs/api/crypto/webcrypto/ed25519.md +121 -0
  550. package/docs/api/crypto/webcrypto/hkdf.md +141 -0
  551. package/docs/api/crypto/webcrypto/hmac.md +112 -0
  552. package/docs/api/crypto/webcrypto/pbkdf2.md +140 -0
  553. package/docs/api/crypto/webcrypto/rsa.md +149 -0
  554. package/docs/api/crypto/webcrypto/x25519.md +96 -0
  555. package/docs/api/dom/README.md +117 -0
  556. package/docs/api/dom/display/README.md +27 -0
  557. package/docs/api/dom/display/animate.md +113 -0
  558. package/docs/api/dom/display/fullscreen.md +121 -0
  559. package/docs/api/dom/fs/README.md +36 -0
  560. package/docs/api/dom/fs/download.md +108 -0
  561. package/docs/api/dom/fs/fsAccess.md +200 -0
  562. package/docs/api/dom/fs/indexedDB.md +219 -0
  563. package/docs/api/dom/fs/remoteStore.md +158 -0
  564. package/docs/api/dom/fs/storage.md +197 -0
  565. package/docs/api/dom/lifecycle/README.md +11 -0
  566. package/docs/api/dom/lifecycle/idle.md +89 -0
  567. package/docs/api/dom/lifecycle/visibility.md +73 -0
  568. package/docs/api/dom/lifecycle/wakeLock.md +94 -0
  569. package/docs/api/dom/net/README.md +31 -0
  570. package/docs/api/dom/net/ajax.md +176 -0
  571. package/docs/api/dom/net/broadcastChannel.md +110 -0
  572. package/docs/api/dom/net/network.md +137 -0
  573. package/docs/api/dom/net/sse.md +141 -0
  574. package/docs/api/dom/net/webrtc.md +158 -0
  575. package/docs/api/dom/net/ws.md +168 -0
  576. package/docs/api/dom/query/README.md +30 -0
  577. package/docs/api/dom/query/dnd.md +137 -0
  578. package/docs/api/dom/query/dom.md +275 -0
  579. package/docs/api/dom/query/events.md +211 -0
  580. package/docs/api/dom/query/gesture.md +137 -0
  581. package/docs/api/dom/query/media.md +188 -0
  582. package/docs/api/dom/rendering/README.md +41 -0
  583. package/docs/api/dom/rendering/chart.md +149 -0
  584. package/docs/api/dom/rendering/component.md +287 -0
  585. package/docs/api/dom/rendering/devtools-ui.md +129 -0
  586. package/docs/api/dom/rendering/devtools.md +157 -0
  587. package/docs/api/dom/rendering/parser.md +200 -0
  588. package/docs/api/dom/rendering/reactiveBind.md +234 -0
  589. package/docs/api/dom/rendering/render.md +219 -0
  590. package/docs/api/dom/rendering/sanitize.md +97 -0
  591. package/docs/api/dom/rendering/secPolicy.md +155 -0
  592. package/docs/api/dom/rendering/template.md +301 -0
  593. package/docs/api/dom/rendering/themeTokens.md +175 -0
  594. package/docs/api/dom/rendering/uiSession.md +546 -0
  595. package/docs/api/dom/rendering/virtualScroll.md +126 -0
  596. package/docs/api/dom/sensors/README.md +12 -0
  597. package/docs/api/dom/sensors/battery.md +70 -0
  598. package/docs/api/dom/sensors/geolocation.md +115 -0
  599. package/docs/api/dom/sensors/networkInfo.md +73 -0
  600. package/docs/api/dom/sensors/sensors.md +123 -0
  601. package/docs/api/dom/sw/README.md +31 -0
  602. package/docs/api/dom/sw/backgroundSync.md +145 -0
  603. package/docs/api/dom/sw/cache.md +116 -0
  604. package/docs/api/dom/sw/push.md +114 -0
  605. package/docs/api/dom/sw/serviceWorker.md +90 -0
  606. package/docs/api/dom/sw/sharedWorker.md +131 -0
  607. package/docs/api/dom/utils/README.md +25 -0
  608. package/docs/api/dom/utils/a11y.md +143 -0
  609. package/docs/api/dom/utils/clipboard.md +146 -0
  610. package/docs/api/dom/utils/entropyCollector.md +175 -0
  611. package/docs/api/dom/utils/focus.md +140 -0
  612. package/docs/api/dom/utils/form.md +196 -0
  613. package/docs/api/dom/utils/formKit.md +181 -0
  614. package/docs/api/dom/utils/keybindings.md +138 -0
  615. package/docs/api/dom/utils/leaderElection.md +130 -0
  616. package/docs/api/dom/utils/notifications.md +106 -0
  617. package/docs/api/dom/utils/permissions.md +82 -0
  618. package/docs/api/dom/utils/route.md +112 -0
  619. package/docs/api/dom/utils/ua.md +119 -0
  620. package/docs/api/dom/utils/webauthn.md +190 -0
  621. package/docs/api/io/README.md +20 -0
  622. package/docs/api/io/binary/README.md +29 -0
  623. package/docs/api/io/binary/reader.md +126 -0
  624. package/docs/api/io/binary/writer.md +127 -0
  625. package/docs/api/io/calc/README.md +22 -0
  626. package/docs/api/io/calc/adler32.md +75 -0
  627. package/docs/api/io/calc/bigint.md +105 -0
  628. package/docs/api/io/calc/crc32.md +74 -0
  629. package/docs/api/io/calc/easing.md +118 -0
  630. package/docs/api/io/codec/README.md +35 -0
  631. package/docs/api/io/codec/b64.md +92 -0
  632. package/docs/api/io/codec/base32.md +98 -0
  633. package/docs/api/io/codec/base58.md +104 -0
  634. package/docs/api/io/codec/buffer.md +144 -0
  635. package/docs/api/io/codec/cbor.md +179 -0
  636. package/docs/api/io/codec/csv.md +178 -0
  637. package/docs/api/io/codec/hex.md +75 -0
  638. package/docs/api/io/codec/mime.md +156 -0
  639. package/docs/api/io/codec/msgpack.md +142 -0
  640. package/docs/api/io/codec/url.md +265 -0
  641. package/docs/api/io/codec/utf8.md +84 -0
  642. package/docs/api/io/codec/xml.md +87 -0
  643. package/docs/api/io/compress/README.md +62 -0
  644. package/docs/api/io/compress/bitstream.md +131 -0
  645. package/docs/api/io/compress/brotli.md +232 -0
  646. package/docs/api/io/compress/brotli_dict.md +119 -0
  647. package/docs/api/io/compress/brotli_dict_words.md +142 -0
  648. package/docs/api/io/compress/brotli_frame.md +214 -0
  649. package/docs/api/io/compress/brotli_shared.md +144 -0
  650. package/docs/api/io/compress/deflate.md +474 -0
  651. package/docs/api/io/compress/gzip.md +130 -0
  652. package/docs/api/io/compress/huffman.md +210 -0
  653. package/docs/api/io/compress/lz4.md +278 -0
  654. package/docs/api/io/compress/lz77.md +180 -0
  655. package/docs/api/io/compress/lzw.md +121 -0
  656. package/docs/api/io/compress/zip.md +209 -0
  657. package/docs/api/io/compress/zlib.md +125 -0
  658. package/docs/api/io/i18n/README.md +23 -0
  659. package/docs/api/io/i18n/i18n.md +128 -0
  660. package/docs/api/io/math/README.md +24 -0
  661. package/docs/api/io/math/fixed-point.md +115 -0
  662. package/docs/api/io/math/geom.md +144 -0
  663. package/docs/api/io/math/interp.md +115 -0
  664. package/docs/api/io/math/linalg.md +138 -0
  665. package/docs/api/io/math/stats.md +109 -0
  666. package/docs/api/io/structures/README.md +31 -0
  667. package/docs/api/io/structures/btree.md +155 -0
  668. package/docs/api/io/structures/heap.md +166 -0
  669. package/docs/api/io/structures/lruCache.md +156 -0
  670. package/docs/api/io/structures/ringBuffer.md +188 -0
  671. package/docs/api/io/structures/tree-walker.md +132 -0
  672. package/docs/api/io/structures/trie.md +138 -0
  673. package/docs/api/io/sync/README.md +29 -0
  674. package/docs/api/io/sync/abort.md +129 -0
  675. package/docs/api/io/sync/atomics.md +159 -0
  676. package/docs/api/io/sync/cancellable.md +176 -0
  677. package/docs/api/io/sync/channel.md +125 -0
  678. package/docs/api/io/sync/mutex.md +93 -0
  679. package/docs/api/io/sync/semaphore.md +106 -0
  680. package/docs/api/io/sync/tokenBucket.md +139 -0
  681. package/docs/api/io/text/README.md +23 -0
  682. package/docs/api/io/text/ansi.md +182 -0
  683. package/docs/api/io/text/html-entities.md +79 -0
  684. package/docs/api/io/text/semver.md +158 -0
  685. package/docs/api/io/text/str.md +129 -0
  686. package/docs/api/io/text/unicode.md +89 -0
  687. package/docs/api/io/time/README.md +22 -0
  688. package/docs/api/io/time/date.md +128 -0
  689. package/docs/api/io/timing/README.md +32 -0
  690. package/docs/api/io/timing/clock.md +102 -0
  691. package/docs/api/io/timing/rateLimit.md +137 -0
  692. package/docs/api/io/timing/scheduler.md +163 -0
  693. package/docs/api/io/utils/README.md +30 -0
  694. package/docs/api/io/utils/bitmap.md +96 -0
  695. package/docs/api/io/utils/errors.md +165 -0
  696. package/docs/api/io/utils/eventBus.md +162 -0
  697. package/docs/api/io/utils/queue.md +141 -0
  698. package/docs/api/io/utils/signal.md +388 -0
  699. package/docs/api/io/utils/ui8.md +111 -0
  700. package/docs/api/io/utils/valid.md +272 -0
  701. package/docs/api/process/README.md +18 -0
  702. package/docs/api/process/message.md +166 -0
  703. package/docs/api/process/rpc.md +161 -0
  704. package/docs/api/process/workerPool.md +130 -0
  705. package/docs/api/sanity/base.md +132 -0
  706. package/docs/api/sanity/community.md +96 -0
  707. package/docs/api/sanity/lockdown.md +128 -0
  708. package/docs/api/typed.md +85 -0
  709. package/docs/dev/README.md +25 -0
  710. package/docs/dev/provenance.md +80 -0
  711. package/docs/dev/publishing.md +31 -0
  712. package/docs/dev/runtime.md +64 -0
  713. package/docs/dev/testing.md +61 -0
  714. package/docs/dev/types.md +35 -0
  715. package/docs/evidence/pqc-hybrid-evidence.md +438 -0
  716. package/docs/guide/README.md +38 -0
  717. package/docs/guide/_QUICK_REF.md +341 -0
  718. package/docs/guide/by-use-case.md +160 -0
  719. package/docs/guide/doc-format.md +306 -0
  720. package/docs/guide/gesture-dnd-side-channel.md +119 -0
  721. package/docs/guide/getting-started.md +134 -0
  722. package/docs/guide/hmr.md +187 -0
  723. package/docs/guide/integration-bundlers.md +193 -0
  724. package/docs/guide/integrations-hmr.md +103 -0
  725. package/docs/guide/module-creation-workflow.md +342 -0
  726. package/docs/guide/module-pattern.md +244 -0
  727. package/docs/guide/rendering-pipeline.md +422 -0
  728. package/docs/guide/security.md +346 -0
  729. package/docs/guide/test-format.md +190 -0
  730. package/docs/guide/tutorial-todo.md +298 -0
  731. package/docs/guide/typescript.md +215 -0
  732. package/docs/guide/worker-confinement.md +301 -0
  733. package/docs/guide/workers.md +168 -0
  734. package/docs/notes/lz77-deflate-factorization.md +96 -0
  735. package/docs/notes/worker-confinement-spike.md +302 -0
  736. package/docs/tools/README.md +56 -0
  737. package/docs/tools/aot.md +108 -0
  738. package/docs/tools/audit.md +61 -0
  739. package/docs/tools/bundler.md +215 -0
  740. package/docs/tools/codegen.md +64 -0
  741. package/docs/tools/jsx.md +236 -0
  742. package/docs/tools/precompilation.md +88 -0
  743. package/docs/tools/standalone.md +107 -0
  744. package/fw.config.json +129 -0
  745. package/integrations/README.md +52 -0
  746. package/integrations/_shared/catalog.generated.json +207 -0
  747. package/integrations/_shared/config-resolve.js +201 -0
  748. package/integrations/_shared/core.js +362 -0
  749. package/integrations/astro/README.md +96 -0
  750. package/integrations/astro/index.d.ts +42 -0
  751. package/integrations/astro/index.js +94 -0
  752. package/integrations/bun/README.md +62 -0
  753. package/integrations/bun/index.d.ts +30 -0
  754. package/integrations/bun/index.js +134 -0
  755. package/integrations/deno/README.md +55 -0
  756. package/integrations/deno/deno.json +10 -0
  757. package/integrations/esbuild/README.md +75 -0
  758. package/integrations/esbuild/backend.js +147 -0
  759. package/integrations/esbuild/index.d.ts +32 -0
  760. package/integrations/esbuild/index.js +147 -0
  761. package/integrations/eslint/README.md +27 -0
  762. package/integrations/eslint/no-factory-capture.js +99 -0
  763. package/integrations/jest/README.md +45 -0
  764. package/integrations/jest/bun-test-shim.js +43 -0
  765. package/integrations/nestjs/README.md +68 -0
  766. package/integrations/nestjs/index.d.ts +38 -0
  767. package/integrations/nestjs/index.js +99 -0
  768. package/integrations/nextjs/README.md +149 -0
  769. package/integrations/nextjs/index.d.ts +30 -0
  770. package/integrations/nextjs/index.js +98 -0
  771. package/integrations/nodejs/README.md +46 -0
  772. package/integrations/nodejs/package.node.example.json +31 -0
  773. package/integrations/rollup/README.md +65 -0
  774. package/integrations/rollup/backend.js +132 -0
  775. package/integrations/rollup/index.d.ts +32 -0
  776. package/integrations/rollup/index.js +84 -0
  777. package/integrations/turbopack/README.md +56 -0
  778. package/integrations/turbopack/index.d.ts +47 -0
  779. package/integrations/turbopack/index.js +164 -0
  780. package/integrations/typedoc/README.md +57 -0
  781. package/integrations/typedoc/categorize.js +121 -0
  782. package/integrations/typedoc/tsconfig.typedoc.json +14 -0
  783. package/integrations/typedoc/typedoc.json +19 -0
  784. package/integrations/vite/README.md +115 -0
  785. package/integrations/vite/index.d.ts +29 -0
  786. package/integrations/vite/index.js +182 -0
  787. package/integrations/vite/package.json +8 -0
  788. package/integrations/vite/vite-env.d.ts +36 -0
  789. package/integrations/vitest/README.md +77 -0
  790. package/integrations/vitest/bun-test-shim.js +92 -0
  791. package/integrations/vitest/vitest.config.js +41 -0
  792. package/integrations/webpack/README.md +53 -0
  793. package/integrations/webpack/index.d.ts +29 -0
  794. package/integrations/webpack/index.js +182 -0
  795. package/package.json +303 -0
  796. package/src/core/logger.js +373 -0
  797. package/src/core/modules.js +289 -0
  798. package/src/core/readyState.js +119 -0
  799. package/src/core/runtime.js +929 -0
  800. package/src/core/worker-helper.js +261 -0
  801. package/src/crypto/NIST_CONFORMANCE.md +249 -0
  802. package/src/crypto/cipher/aes.acvp.md +74 -0
  803. package/src/crypto/cipher/aes.js +512 -0
  804. package/src/crypto/cipher/chacha20.acvp.md +117 -0
  805. package/src/crypto/cipher/chacha20.js +147 -0
  806. package/src/crypto/hash/adf.acvp.md +144 -0
  807. package/src/crypto/hash/adf.js +127 -0
  808. package/src/crypto/hash/argon2.acvp.md +144 -0
  809. package/src/crypto/hash/argon2.js +517 -0
  810. package/src/crypto/hash/blake2b.acvp.md +122 -0
  811. package/src/crypto/hash/blake2b.js +367 -0
  812. package/src/crypto/hash/hkdf.acvp.md +128 -0
  813. package/src/crypto/hash/hkdf.js +145 -0
  814. package/src/crypto/hash/hmac.acvp.md +110 -0
  815. package/src/crypto/hash/hmac.js +177 -0
  816. package/src/crypto/hash/pbkdf2.acvp.md +122 -0
  817. package/src/crypto/hash/pbkdf2.js +120 -0
  818. package/src/crypto/hash/poly1305.acvp.md +111 -0
  819. package/src/crypto/hash/poly1305.js +126 -0
  820. package/src/crypto/hash/sha224.acvp.md +81 -0
  821. package/src/crypto/hash/sha224.js +60 -0
  822. package/src/crypto/hash/sha256.acvp.md +75 -0
  823. package/src/crypto/hash/sha256.js +217 -0
  824. package/src/crypto/hash/sha3.acvp.md +133 -0
  825. package/src/crypto/hash/sha3.js +391 -0
  826. package/src/crypto/hash/sha384.acvp.md +82 -0
  827. package/src/crypto/hash/sha384.js +61 -0
  828. package/src/crypto/hash/sha512.acvp.md +84 -0
  829. package/src/crypto/hash/sha512.js +314 -0
  830. package/src/crypto/hash/sha512_224.acvp.md +90 -0
  831. package/src/crypto/hash/sha512_224.js +66 -0
  832. package/src/crypto/hash/sha512_256.acvp.md +96 -0
  833. package/src/crypto/hash/sha512_256.js +75 -0
  834. package/src/crypto/mode/cbc.acvp.md +105 -0
  835. package/src/crypto/mode/cbc.js +136 -0
  836. package/src/crypto/mode/chacha20poly1305.acvp.md +116 -0
  837. package/src/crypto/mode/chacha20poly1305.js +190 -0
  838. package/src/crypto/mode/cmac.acvp.md +106 -0
  839. package/src/crypto/mode/cmac.js +172 -0
  840. package/src/crypto/mode/ctr.acvp.md +110 -0
  841. package/src/crypto/mode/ctr.js +174 -0
  842. package/src/crypto/mode/gcm.acvp.md +129 -0
  843. package/src/crypto/mode/gcm.js +333 -0
  844. package/src/crypto/mode/kw.acvp.md +145 -0
  845. package/src/crypto/mode/kw.js +323 -0
  846. package/src/crypto/pkc/ecc.acvp.md +181 -0
  847. package/src/crypto/pkc/ecc.js +941 -0
  848. package/src/crypto/pkc/ed25519.acvp.md +172 -0
  849. package/src/crypto/pkc/ed25519.js +582 -0
  850. package/src/crypto/pkc/hybrid-kat.provenance.md +89 -0
  851. package/src/crypto/pkc/hybridKem.js +255 -0
  852. package/src/crypto/pkc/hybridSign.js +437 -0
  853. package/src/crypto/pkc/ml_dsa.acvp.md +146 -0
  854. package/src/crypto/pkc/ml_dsa.js +984 -0
  855. package/src/crypto/pkc/ml_kem.acvp.md +117 -0
  856. package/src/crypto/pkc/ml_kem.js +596 -0
  857. package/src/crypto/pkc/rsa.acvp.md +187 -0
  858. package/src/crypto/pkc/rsa.js +470 -0
  859. package/src/crypto/pkc/slh_dsa.acvp.md +155 -0
  860. package/src/crypto/pkc/slh_dsa.js +820 -0
  861. package/src/crypto/pkc/x25519.acvp.md +113 -0
  862. package/src/crypto/pkc/x25519.js +290 -0
  863. package/src/crypto/utils/aes_ctr.acvp.md +67 -0
  864. package/src/crypto/utils/aes_ctr.js +134 -0
  865. package/src/crypto/utils/aes_modes.acvp.md +66 -0
  866. package/src/crypto/utils/aes_modes.js +241 -0
  867. package/src/crypto/utils/asn1-oid.js +369 -0
  868. package/src/crypto/utils/asn1.js +343 -0
  869. package/src/crypto/utils/bitArray.js +312 -0
  870. package/src/crypto/utils/bn.js +825 -0
  871. package/src/crypto/utils/jws.js +222 -0
  872. package/src/crypto/utils/keyformat.js +303 -0
  873. package/src/crypto/utils/pad.js +198 -0
  874. package/src/crypto/utils/pem.js +90 -0
  875. package/src/crypto/utils/random.acvp.md +167 -0
  876. package/src/crypto/utils/random.js +846 -0
  877. package/src/crypto/utils/rsaKeygen.acvp.md +158 -0
  878. package/src/crypto/utils/rsaKeygen.js +448 -0
  879. package/src/crypto/utils/totp.js +409 -0
  880. package/src/crypto/utils/uuid.acvp.md +137 -0
  881. package/src/crypto/utils/uuid.js +176 -0
  882. package/src/crypto/wasm/aes.js +494 -0
  883. package/src/crypto/wasm/argon2.js +236 -0
  884. package/src/crypto/wasm/blake2b.js +213 -0
  885. package/src/crypto/wasm/chacha20poly1305.js +238 -0
  886. package/src/crypto/wasm/cmac.js +207 -0
  887. package/src/crypto/wasm/ecc.js +437 -0
  888. package/src/crypto/wasm/ed25519.js +307 -0
  889. package/src/crypto/wasm/hkdf.js +183 -0
  890. package/src/crypto/wasm/hmac.js +215 -0
  891. package/src/crypto/wasm/ml_dsa.js +375 -0
  892. package/src/crypto/wasm/ml_kem.js +313 -0
  893. package/src/crypto/wasm/pbkdf2.js +205 -0
  894. package/src/crypto/wasm/rsa.js +674 -0
  895. package/src/crypto/wasm/runtime.js +400 -0
  896. package/src/crypto/wasm/sha2.js +183 -0
  897. package/src/crypto/wasm/sha3.js +221 -0
  898. package/src/crypto/wasm/slh_dsa.js +397 -0
  899. package/src/crypto/wasm/x25519.js +241 -0
  900. package/src/crypto/webcrypto/aes.js +370 -0
  901. package/src/crypto/webcrypto/aeskw.js +185 -0
  902. package/src/crypto/webcrypto/digest.js +136 -0
  903. package/src/crypto/webcrypto/ecc.js +371 -0
  904. package/src/crypto/webcrypto/ed25519.js +248 -0
  905. package/src/crypto/webcrypto/hkdf.js +132 -0
  906. package/src/crypto/webcrypto/hmac.js +213 -0
  907. package/src/crypto/webcrypto/pbkdf2.js +146 -0
  908. package/src/crypto/webcrypto/rsa.js +415 -0
  909. package/src/crypto/webcrypto/x25519.js +250 -0
  910. package/src/dom/display/animate.js +154 -0
  911. package/src/dom/display/fullscreen.js +305 -0
  912. package/src/dom/fs/download.js +118 -0
  913. package/src/dom/fs/fsAccess.js +307 -0
  914. package/src/dom/fs/indexedDB.js +465 -0
  915. package/src/dom/fs/remoteStore.js +484 -0
  916. package/src/dom/fs/storage.js +440 -0
  917. package/src/dom/lifecycle/idle.js +133 -0
  918. package/src/dom/lifecycle/visibility.js +140 -0
  919. package/src/dom/lifecycle/wakeLock.js +187 -0
  920. package/src/dom/net/ajax.js +303 -0
  921. package/src/dom/net/broadcastChannel.js +89 -0
  922. package/src/dom/net/network.js +260 -0
  923. package/src/dom/net/sse.js +295 -0
  924. package/src/dom/net/webrtc.js +381 -0
  925. package/src/dom/net/ws.js +290 -0
  926. package/src/dom/query/dnd.js +409 -0
  927. package/src/dom/query/dom.js +831 -0
  928. package/src/dom/query/events.js +425 -0
  929. package/src/dom/query/gesture.js +396 -0
  930. package/src/dom/query/media.js +616 -0
  931. package/src/dom/rendering/chart.js +663 -0
  932. package/src/dom/rendering/component.js +469 -0
  933. package/src/dom/rendering/devtools-ui.js +399 -0
  934. package/src/dom/rendering/devtools.js +352 -0
  935. package/src/dom/rendering/parser.js +1055 -0
  936. package/src/dom/rendering/reactiveBind.js +341 -0
  937. package/src/dom/rendering/render.js +601 -0
  938. package/src/dom/rendering/sanitize.js +364 -0
  939. package/src/dom/rendering/secPolicy.js +281 -0
  940. package/src/dom/rendering/template.js +1031 -0
  941. package/src/dom/rendering/themeTokens.js +522 -0
  942. package/src/dom/rendering/uiSession-core.js +597 -0
  943. package/src/dom/rendering/uiSession-direct.js +251 -0
  944. package/src/dom/rendering/uiSession-list.js +751 -0
  945. package/src/dom/rendering/uiSession.js +145 -0
  946. package/src/dom/rendering/virtualScroll.js +341 -0
  947. package/src/dom/sensors/battery.js +153 -0
  948. package/src/dom/sensors/geolocation.js +156 -0
  949. package/src/dom/sensors/networkInfo.js +136 -0
  950. package/src/dom/sensors/sensors.js +340 -0
  951. package/src/dom/sw/backgroundSync.js +113 -0
  952. package/src/dom/sw/cache.js +139 -0
  953. package/src/dom/sw/push.js +181 -0
  954. package/src/dom/sw/serviceWorker.js +193 -0
  955. package/src/dom/sw/sharedWorker.js +192 -0
  956. package/src/dom/utils/a11y.js +244 -0
  957. package/src/dom/utils/clipboard.js +113 -0
  958. package/src/dom/utils/entropyCollector.js +344 -0
  959. package/src/dom/utils/focus.js +421 -0
  960. package/src/dom/utils/form.js +535 -0
  961. package/src/dom/utils/formKit.js +427 -0
  962. package/src/dom/utils/keybindings.js +574 -0
  963. package/src/dom/utils/leaderElection.js +280 -0
  964. package/src/dom/utils/notifications.js +218 -0
  965. package/src/dom/utils/permissions.js +107 -0
  966. package/src/dom/utils/route.js +482 -0
  967. package/src/dom/utils/ua.js +109 -0
  968. package/src/dom/utils/webauthn.js +369 -0
  969. package/src/external/README.md +15 -0
  970. package/src/io/binary/reader.js +374 -0
  971. package/src/io/binary/writer.js +351 -0
  972. package/src/io/calc/adler32.js +94 -0
  973. package/src/io/calc/bigint.js +276 -0
  974. package/src/io/calc/crc32.js +111 -0
  975. package/src/io/calc/easing.js +514 -0
  976. package/src/io/codec/b64.js +235 -0
  977. package/src/io/codec/base32.js +147 -0
  978. package/src/io/codec/base58.js +167 -0
  979. package/src/io/codec/buffer.js +630 -0
  980. package/src/io/codec/cbor.js +550 -0
  981. package/src/io/codec/csv.js +299 -0
  982. package/src/io/codec/hex.js +129 -0
  983. package/src/io/codec/mime.js +398 -0
  984. package/src/io/codec/msgpack.js +491 -0
  985. package/src/io/codec/url.js +530 -0
  986. package/src/io/codec/utf8.js +181 -0
  987. package/src/io/codec/xml.js +428 -0
  988. package/src/io/compress/bitstream.js +199 -0
  989. package/src/io/compress/brotli.js +3073 -0
  990. package/src/io/compress/brotli_dict.bin +432 -0
  991. package/src/io/compress/brotli_dict.js +356 -0
  992. package/src/io/compress/brotli_dict_words.js +157 -0
  993. package/src/io/compress/brotli_frame.js +420 -0
  994. package/src/io/compress/brotli_shared.js +715 -0
  995. package/src/io/compress/deflate.js +1432 -0
  996. package/src/io/compress/gzip.js +406 -0
  997. package/src/io/compress/huffman.js +322 -0
  998. package/src/io/compress/lz4.js +451 -0
  999. package/src/io/compress/lz77.js +408 -0
  1000. package/src/io/compress/lzw.js +332 -0
  1001. package/src/io/compress/zip.js +815 -0
  1002. package/src/io/compress/zlib.js +340 -0
  1003. package/src/io/i18n/i18n.js +236 -0
  1004. package/src/io/math/fixed-point.js +269 -0
  1005. package/src/io/math/geom.js +350 -0
  1006. package/src/io/math/interp.js +263 -0
  1007. package/src/io/math/linalg.js +472 -0
  1008. package/src/io/math/stats.js +339 -0
  1009. package/src/io/structures/btree.js +357 -0
  1010. package/src/io/structures/heap.js +249 -0
  1011. package/src/io/structures/lruCache.js +219 -0
  1012. package/src/io/structures/ringBuffer.js +208 -0
  1013. package/src/io/structures/tree-walker.js +413 -0
  1014. package/src/io/structures/trie.js +219 -0
  1015. package/src/io/sync/abort.js +196 -0
  1016. package/src/io/sync/atomics.js +342 -0
  1017. package/src/io/sync/cancellable.js +279 -0
  1018. package/src/io/sync/channel.js +301 -0
  1019. package/src/io/sync/mutex.js +148 -0
  1020. package/src/io/sync/semaphore.js +156 -0
  1021. package/src/io/sync/tokenBucket.js +208 -0
  1022. package/src/io/text/ansi.js +536 -0
  1023. package/src/io/text/html-entities.js +143 -0
  1024. package/src/io/text/semver.js +375 -0
  1025. package/src/io/text/str.js +243 -0
  1026. package/src/io/text/unicode.js +188 -0
  1027. package/src/io/time/date.js +355 -0
  1028. package/src/io/timing/clock.js +79 -0
  1029. package/src/io/timing/rateLimit.js +264 -0
  1030. package/src/io/timing/scheduler.js +351 -0
  1031. package/src/io/utils/bitmap.js +94 -0
  1032. package/src/io/utils/errors.js +269 -0
  1033. package/src/io/utils/eventBus.js +315 -0
  1034. package/src/io/utils/queue.js +223 -0
  1035. package/src/io/utils/signal.js +858 -0
  1036. package/src/io/utils/ui8.js +99 -0
  1037. package/src/io/utils/valid.js +556 -0
  1038. package/src/main.js +41 -0
  1039. package/src/polyfill/README.md +9 -0
  1040. package/src/process/message.js +257 -0
  1041. package/src/process/rpc.js +286 -0
  1042. package/src/process/workerPool.js +392 -0
  1043. package/src/sanity/base.js +374 -0
  1044. package/src/sanity/community.js +254 -0
  1045. package/src/sanity/lockdown-apply.js +58 -0
  1046. package/src/sanity/lockdown.js +408 -0
  1047. package/src/sanity/wasm-gate.js +316 -0
  1048. package/src/typed.js +53 -0
  1049. package/third-party/NOTICE-penner-easing +88 -0
  1050. package/third-party/NOTICE-sjcl +50 -0
  1051. package/tools/_lib/cli-help.js +55 -0
  1052. package/tools/rendering/aot/index.js +148 -0
  1053. package/tools/rendering/aot/lib/dom-codegen.js +295 -0
  1054. package/tools/rendering/jsx/index.js +654 -0
  1055. package/tools/rendering/precompilation/index.js +368 -0
  1056. package/types/registry.generated.d.ts +217 -0
  1057. package/types/typed.d.ts +106 -0
@@ -0,0 +1,474 @@
1
+ ---
2
+ module: deflate
3
+ category: io/compress
4
+ dependencies: [bitstream, huffman, lz77]
5
+ returns: object
6
+ worker-safe: true
7
+ status: complete
8
+ ---
9
+
10
+ # deflate
11
+
12
+ > DEFLATE compression (RFC 1951) — LZ77 + Huffman coding. Internal engine used by `gzip`, `zlib`, and `zip`.
13
+
14
+ **Module** `deflate` | **Source** `packages/front/fw/src/io/compress/deflate.js` | **Deps** `bitstream`, `huffman`, `lz77` | **Worker-safe** yes
15
+
16
+ ## Resolve
17
+
18
+ ```js
19
+ const deflate = runtime.resolve('deflate');
20
+ // Returns: { deflateSync, inflateSync, deflate, inflate, DeflateStream, InflateStream }
21
+ ```
22
+
23
+ ## API
24
+
25
+ ### Synchrone
26
+
27
+ ```js
28
+ const compressed = deflate.deflateSync(uint8Array, opts?); // → Uint8Array
29
+ const decompressed = deflate.inflateSync(compressed, opts?); // → Uint8Array
30
+ ```
31
+
32
+ ### Asynchrone
33
+
34
+ ```js
35
+ const compressed = await deflate.deflate(uint8Array, opts?); // → Uint8Array
36
+ const decompressed = await deflate.inflate(compressed, opts?); // → Uint8Array
37
+ ```
38
+
39
+ The async API uses `queueMicrotask` — it does not block the thread but is not multi-threaded.
40
+
41
+ ### Streaming — compression (deflate)
42
+
43
+ ```js
44
+ const chunks = [];
45
+ const stream = new deflate.DeflateStream(opts?, (chunk) => chunks.push(chunk));
46
+
47
+ stream.push(data1);
48
+ stream.push(data2);
49
+ stream.flush(); // flushes the buffer without finalizing
50
+ stream.push(lastChunk, true); // finalizes the stream
51
+ ```
52
+
53
+ ### Streaming — decompression (inflate)
54
+
55
+ ```js
56
+ const output = [];
57
+ const stream = new deflate.InflateStream(opts?, (chunk) => output.push(chunk));
58
+
59
+ stream.push(compressedChunk);
60
+ stream.push(lastChunk, true);
61
+ ```
62
+
63
+ ## Options
64
+
65
+ ### Compression
66
+
67
+ | Option | Type | Description |
68
+ |--------|------|-------------|
69
+ | `level` | `0–9` | Compression level (0 = store, 9 = max). Default: 6 |
70
+ | `mem` | `0–12` | Hash-table width for the LZ77 scan, `min(22, 12 + mem)` bits (not a window/search-depth size). Default: unset — width tracks input size, `clamp(ceil(log2(inputLength)), 12, 20)` |
71
+ | `lazy` | `boolean` | Lazy matching in the LZ77 scan: a better ratio (about −0.7 % bytes at levels 8–9) for a slower scan at levels 4–9. Default: `false` — the fast path. See [Design › Encoder](#encoder) |
72
+ | `dictionary` | `Uint8Array` | Pre-compression dictionary |
73
+
74
+ The same options reach `deflate` through `gzip`, `zlib` and `zip`, so
75
+ `gzipSync(data, { level: 9, lazy: true })` is the maximum-ratio request.
76
+
77
+ ### Decompression
78
+
79
+ | Option | Type | Description |
80
+ |--------|------|-------------|
81
+ | `out` | `Uint8Array` | Pre-allocated output buffer |
82
+ | `dictionary` | `Uint8Array` | Dictionary matching the compression |
83
+
84
+ ## Error codes
85
+
86
+ Every error thrown by this module is an `Error` carrying a numeric `e.code`.
87
+ The table lists the complete set — verified against the `fail()` call sites in
88
+ `deflate.js`.
89
+
90
+ | Code | Message | Raised when |
91
+ |------|---------|-------------|
92
+ | 0 | `unexpected EOF` | the input ends inside a block header, a symbol, or a stored body (one-shot decoding, or a stream closed with `final = true`) |
93
+ | 1 | `invalid block type` | `BTYPE = 3` (RFC 1951 §3.2.3 reserved value) |
94
+ | 2 | `invalid length/literal` | a literal/length code has no entry in the active table, or a length symbol above 285 is read |
95
+ | 3 | `invalid distance` | a distance code has no entry, a distance symbol above 29 is read, or the distance reaches back before the start of the output (dictionary included) |
96
+ | 4 | `stream finished` | `push()` after the chunk marked `final` |
97
+ | 5 | `no stream handler` | `push()` on a stream constructed without `ondata` |
98
+ | 8 | `invalid data` | a malformed dynamic header, a stored-block `LEN`/`NLEN` mismatch, or an overflow of the caller-provided `out` buffer (the message states which) |
99
+
100
+ Codes 12 and 13 belong to [gzip](./gzip.md) and [zip](./zip.md); `deflate`
101
+ never emits them.
102
+
103
+ ## Design
104
+
105
+ ### Decoder
106
+
107
+ The decoder (`inflateSync`, `inflate`, `InflateStream`) is written from
108
+ RFC 1951 and shares its derived tables with the encoder below.
109
+
110
+ **Tables.** Nothing is transcribed by hand. `LENGTH_EXTRA` / `LENGTH_BASE`
111
+ (symbols 257–285) and `DIST_EXTRA` / `DIST_BASE` (symbols 0–29) are derived at
112
+ factory time from the RFC §3.2.5 formulas — `extra(i) = i < 8 || i === 28 ? 0
113
+ : (i - 4) >> 2` for lengths, `extra(i) = i < 4 ? 0 : (i - 2) >> 1` for
114
+ distances — with the bases accumulated from 3 and 1 respectively and the
115
+ single special case `LENGTH_BASE[28] = 258`. `CODE_LENGTH_ORDER` (§3.2.7) and
116
+ the fixed code lengths (§3.2.6: 8/9/7/8 for the literal code, a flat 5 for the
117
+ 30 usable distance codes) follow the same rule. The decode tables come from
118
+ the shared `huffman.buildMap(lengths, maxBits, 1)` primitive: an entry is
119
+ `(symbol << 4) | codeLength`, indexed by the next `maxBits` bits read
120
+ LSB-first, and entry `0` means "no code here". `deflate.test.js` re-derives
121
+ each table from the RFC formulas, compares it with the RFC tables transcribed
122
+ literally, and decodes a hand-assembled vector per length and per distance
123
+ symbol at both ends of its range.
124
+
125
+ **Block state machine.** A decoder state — `bitPos`, `finalBlock`, `phase`,
126
+ `storedRemaining`, the two tables and their widths, `out` / `outLen` /
127
+ `emitted` — moves between four phases: `HEADER` reads `BFINAL` + `BTYPE` and
128
+ the per-type preamble (stored `LEN`/`NLEN`, the fixed tables, or the dynamic
129
+ header of §3.2.7); `STORED` copies the body of a `BTYPE = 0` block, resuming a
130
+ partial copy; `CODES` decodes literal/length and distance symbols until
131
+ end-of-block; `DONE` is reached when the final block ends.
132
+
133
+ **Resumability.** `bitstream.readBits` pads reads past the end of the buffer
134
+ with zeros, so an overrun is detected by POSITION, never by an exception:
135
+ `bitPos` is snapshotted before each block header and before each symbol, and a
136
+ read that lands past `input.length * 8` — or a table lookup that returns entry
137
+ `0` while fewer than `maxBits` bits remain — restores the snapshot. In
138
+ one-shot mode that condition fails with code 0; in stream mode it returns
139
+ "need input", `InflateStream` keeps the bytes from the last consumed byte
140
+ boundary, and the next `push` re-reads from the snapshot (a partially read
141
+ dynamic header is simply re-parsed, which is bounded by the header size).
142
+ After each push only the last 32 KiB of output are retained as the
143
+ back-reference window.
144
+
145
+ **Output growth.** Without `opts.out` the buffer starts at
146
+ `max(64 KiB, 3 × input.length)` and doubles on demand; the result is a
147
+ copy trimmed to the exact length. With `opts.out` the decoder writes directly
148
+ into the caller's buffer, returns a view into it, and raises code 8 rather
149
+ than growing. `opts.dictionary` primes the output with the dictionary's last
150
+ 32 KiB so back-references into it are ordinary in-buffer copies; combined with
151
+ `opts.out`, decoding runs in an internal buffer and the payload alone is
152
+ copied across at the end.
153
+
154
+ **Known limitation.** An over-subscribed or incomplete dynamic Huffman code is
155
+ not validated when the header is read. Such a stream is not silently accepted:
156
+ decoding proceeds and ends in code 2, code 3 or code 8 as soon as a hole in
157
+ the table is hit.
158
+
159
+ ### Encoder
160
+
161
+ The compressor (`deflateSync`, `deflate`, `DeflateStream`) is written from
162
+ RFC 1951 as well. Its matching pass is the shared [lz77](./lz77.md) module —
163
+ `deflate` owns only the DEFLATE-specific parts: the symbol mapping of §3.2.5,
164
+ the block-type decision, and the canonical Huffman coding of §3.2.6/§3.2.7.
165
+
166
+ **Matching.** `lz77.encodeTokens` is called once per compression unit with
167
+ `windowBits: 15`, `minMatch: 3`, `maxMatch: 258` and an injected `hashFn` —
168
+ the 3-byte Fibonacci hash
169
+ `imul(d[i] | d[i+1] << 8 | d[i+2] << 16, 0x9E3779B1) >>> (32 - hashBits)`,
170
+ i.e. exactly the bytes that define a minimum-length match, and with the
171
+ `chainSkip` walk on. Search effort per level, as shipped (zlib's shape for
172
+ `chainDepth` / `niceLength` / `goodLength` / `maxLazy`):
173
+
174
+ | Level | `chainDepth` | `niceLength` | `goodLength` | `maxLazy` |
175
+ |---|---|---|---|---|
176
+ | 0 | — | — | — | — (stored blocks only, no `lz77` call) |
177
+ | 1 | 4 | 8 | — | — |
178
+ | 2 | 8 | 16 | — | — |
179
+ | 3 | 16 | 32 | — | — |
180
+ | 4 | 16 | 16 | 4 | 4 |
181
+ | 5 | 32 | 32 | 8 | 16 |
182
+ | 6 | 128 | 128 | 8 | 16 |
183
+ | 7 | 256 | 128 | 8 | 32 |
184
+ | 8 | 1024 | 258 | 32 | 128 |
185
+ | 9 | 4096 | 258 | 32 | 258 |
186
+
187
+ `level` defaults to 6 and is clamped to `0..9`. No level turns lazy
188
+ matching on: `goodLength` / `maxLazy` (levels 1–3: the `lz77` defaults)
189
+ only act under the `lazy` option below.
190
+
191
+ **Lazy matching is an option, not a level.** `{ lazy: true }` enables
192
+ `lz77`'s lazy probe at every level ≥ 1 — the same engine with one more
193
+ probe per match, throttled by the level's `goodLength` / `maxLazy`. It is
194
+ what buys the ratio (−0.67 % bytes at levels 8–9 on the bench corpora, and
195
+ better than zlib on the text corpus) and what costs the time (+18 % at
196
+ level 8, +90 % on the JSON corpus). The default stays the fast
197
+ configuration because that is the one that meets the batch's `< +5 %`
198
+ time gate at every level. Measured on the option-vs-separate-path
199
+ question: the `lazy` test is taken once per match, on a hoisted local,
200
+ and an interleaved A/B of the shipped scanner against the same file with
201
+ the lazy branch deleted gives an aggregate Δ of +0.1 % / +1.5 % / +0.5 %
202
+ (levels 1 / 4 / 8) in one load order and −1.1 % / +0.2 % / −1.0 % in the
203
+ other — noise, so one loop and one option rather than two scan functions.
204
+
205
+ **`mem` → `hashBits`.** With `mem` given, the hash table is
206
+ `min(22, 12 + mem)` bits wide; without it the width tracks the input size,
207
+ `clamp(ceil(log2(inputLength)), 12, 20)`.
208
+
209
+ **Blocks and cost.** The scan of a compression unit is one
210
+ `lz77.encodeTokens` call whose packed `(len | 0, dist | byte)` pairs are
211
+ read in place: a block is a window `[from, to)` of 16 384 tokens over that
212
+ buffer, tallied in one pass into the literal/length and distance
213
+ frequencies and the total of extra bits, then written; the tail block
214
+ carries `BFINAL`. The pairs are never copied into a second layout. For each
215
+ block three exact bit costs are computed and the cheapest wins:
216
+
217
+ | Type | Cost |
218
+ |---|---|
219
+ | stored (§3.2.4) | `8 × (5 + n) + align`, only when `n ≤ 65535` |
220
+ | fixed (§3.2.6) | `3 + Σ litFreq·fixedLitLen + Σ distFreq·5 + extraBits` |
221
+ | dynamic (§3.2.7) | `3 + 14 + 3·HCLEN + Σ clFreq·clLen + clExtra + Σ litFreq·litLen + Σ distFreq·distLen + extraBits` |
222
+
223
+ Trees come from `huffman.buildTree(freqs, 15)` (7 for the code-length code)
224
+ and codes from `huffman.buildMap(lengths, maxBits, 0)`, which are already
225
+ bit-reversed for `bitstream.writeBits`. A block with no distance token is
226
+ written with `HDIST = 1` and a single distance length of zero, as §3.2.7
227
+ allows. The dynamic form is skipped when the literal/length or code-length
228
+ code would hold a single symbol: that code is incomplete, which §3.2.7
229
+ tolerates only for distances. An empty input is therefore one empty final
230
+ fixed block — the two bytes `03 00`.
231
+
232
+ `BLOCK_TOKENS` stays at 16 384: `huffman.buildTree` uses a frequency
233
+ sentinel of 25 001, so a block's symbol total must stay below it.
234
+
235
+ **Memory.** The token buffer is the encoder's working set: `deflateSync`
236
+ on N bytes holds an `Int32Array` of `2 × N` entries — 8 bytes per input
237
+ byte — until it returns (up to 8 MiB of it is kept between calls as a
238
+ scratch buffer; larger ones are transient). `DeflateStream` compresses in
239
+ 64 KiB units and stays bounded. A resumable scanner filling a fixed
240
+ `BLOCK_TOKENS` buffer would remove this and is the recorded follow-up.
241
+
242
+ **Streaming.** `DeflateStream` keeps the last 32 KiB of input as a window and
243
+ buffers pushes until 64 KiB or `final`, then compresses `window ++ pending`
244
+ with `start = window.length`. Whole bytes go out through `ondata`; a trailing
245
+ partial byte stays in the carry and opens the next unit, so `flush()` never
246
+ forces byte alignment. The contract is that the **concatenation** of every
247
+ `ondata` chunk is one valid raw DEFLATE stream — where the chunk boundaries
248
+ fall is not part of it, and they differ from the pre-batch engine's.
249
+
250
+ ## Benchmark
251
+
252
+ Final gate record on the merged tree (task 03 + the perf landing), full
253
+ baseline sha `b10c8a6da43e8c598645d097a678c38249ddebbc` (`git merge-base
254
+ master HEAD`), with the batch's exact command:
255
+
256
+ ```
257
+ bun packages/front/fw/tools/bench/deflate-levels.js \
258
+ --baseline b10c8a6da43e8c598645d097a678c38249ddebbc --reps 7 --warmup 3 \
259
+ --json tmp/bench/04-final-20260905T105342Z.json
260
+ ```
261
+
262
+ Host: `win32` / `13th Gen Intel(R) Core(TM) i7-13700KF` / Bun `1.3.13`.
263
+ Six deterministic corpora (`text` = the RFC 7932 dictionary blob,
264
+ `source` = `brotli.js`, `json`, `random`, `repeat`, `small` = 200 × 2 KiB
265
+ calls), levels 1–9, median of 7 timed reps after 3 warm-ups. Artifact
266
+ `tmp/bench/04-final-20260905T105342Z.json` (gitignored), generated
267
+ `2026-09-05T10:53:48.246Z`. Every output of both engines round-trips
268
+ through our `inflateSync`, and the fw test suite cross-checks the same
269
+ corpora against `node:zlib`. Δ is `new` against `old`; a negative Δtime
270
+ is faster. The ruled gate is `Δtime < +5 %` per level, with a proposed
271
+ ratio tolerance of `Δratio ≤ +1 %`.
272
+
273
+ ### Default configuration (shipped table, `lazy` off)
274
+
275
+ | Level | Old ms | New ms | Δtime % | Old bytes | New bytes | Δratio % | Verdict |
276
+ |---|---|---|---|---|---|---|---|
277
+ | 1 | 27.01 | 22.86 | **−15.3 %** | 577 206 | 574 443 | −0.48 % | PASS |
278
+ | 2 | 26.15 | 23.03 | **−11.9 %** | 567 921 | 567 269 | −0.11 % | PASS |
279
+ | 3 | 26.73 | 22.38 | **−16.3 %** | 564 084 | 562 905 | −0.21 % | PASS |
280
+ | 4 | 29.23 | 26.24 | **−10.2 %** | 561 392 | 564 059 | +0.48 % | PASS |
281
+ | 5 | 28.20 | 22.84 | **−19.0 %** | 560 089 | 560 350 | +0.05 % | PASS |
282
+ | 6 | 31.48 | 25.10 | **−20.2 %** | 557 944 | 558 319 | +0.07 % | PASS |
283
+ | 7 | 33.80 | 26.66 | **−21.1 %** | 557 528 | 557 952 | +0.08 % | PASS |
284
+ | 8 | 35.16 | 27.51 | **−21.8 %** | 557 337 | 557 772 | +0.08 % | PASS |
285
+ | 9 | 40.24 | 28.13 | **−30.1 %** | 557 334 | 557 766 | +0.08 % | PASS |
286
+
287
+ All nine levels **PASS** both thresholds: Δtime is negative (faster) at
288
+ every level and Δratio stays within ±1 % (better than the baseline at
289
+ levels 1–3, at parity elsewhere — the largest regression is +0.48 % at
290
+ level 4). Per corpus, the persistent residual is the incompressible
291
+ `random` corpus (+13 … +53 % in this run — the known fixed per-position
292
+ cost of the generic scanner over an engine that inlines its probe, the
293
+ analysis' fix 7, deliberately not taken); `repeat` is the biggest winner
294
+ at −46 … −56 %.
295
+
296
+ **Measurement caveat.** Individual per-corpus cells of this sequential
297
+ harness move by up to ±30–50 % between runs on this host, in both
298
+ directions — the aggregate per level, not any single cell, is what the
299
+ gate reads. The `text` corpus at level 4 is a reproducible instance of
300
+ this (this run: old 2.79 ms / new 3.82 ms, a cell Δtime of +37 %, while
301
+ the level's aggregate is still −10.2 %): an earlier interleaved-repetition
302
+ investigation traced it to a JIT-state carry-over that appears only when the `repeat`
303
+ corpus runs immediately before `text` in the same process at level 4,
304
+ disappears when level 4 runs alone or in a directory-to-directory
305
+ interleaved comparison — there this engine is byte-identical to the
306
+ analysis' `p6nl` prototype at every cell and within ±1 % of its time — and
307
+ is unrelated to the engine change. Read the aggregates, not the cells; a
308
+ finer per-corpus verdict needs interleaved A/B repetitions (backlog item
309
+ proposed in the perf-landing session, not yet filed as this task's
310
+ perimeter excludes the bench tool).
311
+
312
+ ### `{ lazy: true }` (same engine, lazy matching on) — supplementary, not gated
313
+
314
+ Measured separately by the perf-landing session at `--warmup 15 --reps 11`
315
+ (not re-run by this task: the batch gate covers only the default
316
+ configuration above).
317
+
318
+ | Level | Old ms | New ms | Δtime | Old bytes | New bytes | Δbytes |
319
+ |---|---|---|---|---|---|---|
320
+ | 1 | 25.03 | 21.40 | −14.5 % | 577 206 | 570 076 | **−1.24 %** |
321
+ | 2 | 30.04 | 23.15 | −22.9 % | 567 921 | 561 810 | **−1.08 %** |
322
+ | 3 | 26.82 | 26.02 | −3.0 % | 564 084 | 557 766 | **−1.12 %** |
323
+ | 4 | 27.75 | 24.22 | −12.7 % | 561 392 | 563 035 | +0.29 % |
324
+ | 5 | 28.43 | 25.71 | −9.6 % | 560 089 | 556 986 | **−0.55 %** |
325
+ | 6 | 31.13 | 28.18 | −9.5 % | 557 944 | 555 149 | **−0.50 %** |
326
+ | 7 | 32.67 | 31.93 | −2.3 % | 557 528 | 554 208 | **−0.60 %** |
327
+ | 8 | 35.61 | 43.72 | +22.8 % | 557 337 | 553 585 | **−0.67 %** |
328
+ | 9 | 40.61 | 46.73 | +15.1 % | 557 334 | 553 579 | **−0.67 %** |
329
+
330
+ Lazy matching is where the ratio comes from — and where the time goes at
331
+ the two top levels: `json` +85 … +91 %, `text` +38 … +40 %, `source`
332
+ +6 … −13 %, `small` −9 … −14 %. At level 9 with `lazy` the `text` corpus
333
+ compresses to 58 286 bytes, below zlib's 59 319 at its level 9; at
334
+ level 4 the zlib-shaped table (`maxLazy 4`) gives up ratio on `json`
335
+ (+4.5 %) for a −13 % time, the trade the analysis flagged and the owner
336
+ accepted.
337
+
338
+ Artifacts of the `lazy` run: `tmp/bench/04-default.{json,md}` and
339
+ `tmp/bench/04-lazy.{json,md}` (gitignored). Re-run with
340
+ `bun packages/front/fw/tools/bench/deflate-levels.js --baseline b10c8a6da43e8c598645d097a678c38249ddebbc --warmup 15 --reps 11 [--opts '{"lazy":true}']`.
341
+ The gate table above (default configuration) was re-run for this record
342
+ with the batch's own `--reps 7 --warmup 3`; artifact
343
+ `tmp/bench/04-final-20260905T105342Z.json` (gitignored).
344
+
345
+ ### Clean-room huffman/bitstream rewrite (2026-09)
346
+
347
+ `deflate.js` itself is unchanged by the clean-room rewrite; this record
348
+ measures the effect on the `deflate` codec of the underlying
349
+ `huffman`/`bitstream` clean-room rewrite (see [huffman](./huffman.md),
350
+ [bitstream](./bitstream.md)) plus the perf pass landed on `huffman.js`
351
+ (two-queue fast path ahead of package-merge). Same six corpora and levels
352
+ 1-9, `--reps 7 --warmup 3`, baseline sha
353
+ `d47f8fc7a68809f519fe7d36ff2b0ba88bcacdbd` (`git merge-base master HEAD`
354
+ taken before the rewrite). Host `win32` / `13th Gen Intel(R) Core(TM)
355
+ i7-13700KF` / Bun `1.3.13`. Generated `2026-09-24T20:49:44.085Z`
356
+ (gitignored bench artifact). Rule: `Δenc < +5 %`, `Δdec < +5 %` per level
357
+ and per corpus; `Δbytes ≤ 0`.
358
+
359
+ | Level | Corpus | Old enc ms | New enc ms | Δenc % | Old dec ms | New dec ms | Δdec % | Old B | New B | Δbytes % | Verdict |
360
+ |---|---|---|---|---|---|---|---|---|---|---|---|
361
+ | 1 | text | 2.85 | 2.36 | -17.4 | 1.01 | 0.97 | -3.6 | 62495 | 62495 | 0.00 | PASS |
362
+ | 1 | source | 1.84 | 1.83 | -0.4 | 0.71 | 0.66 | -7.7 | 40427 | 40427 | 0.00 | PASS |
363
+ | 1 | json | 2.50 | 2.44 | -2.2 | 1.02 | 0.78 | -23.0 | 55435 | 55435 | 0.00 | PASS |
364
+ | 1 | random | 4.76 | 4.29 | -10.0 | 0.08 | 0.08 | 6.2 | 262224 | 262224 | 0.00 | FAIL (dec) |
365
+ | 1 | repeat | 0.88 | 0.86 | -1.5 | 0.26 | 0.24 | -7.7 | 1047 | 1047 | 0.00 | PASS |
366
+ | 1 | small | 10.17 | 9.93 | -2.4 | 4.52 | 4.46 | -1.3 | 153607 | 153607 | 0.00 | PASS |
367
+ | 2 | text | 3.72 | 3.89 | 4.5 | 0.70 | 0.70 | -0.9 | 60878 | 60878 | 0.00 | PASS |
368
+ | 2 | source | 2.16 | 2.13 | -1.4 | 0.60 | 0.58 | -3.6 | 38671 | 38671 | 0.00 | PASS |
369
+ | 2 | json | 3.30 | 3.27 | -1.1 | 0.71 | 0.68 | -5.4 | 53329 | 53329 | 0.00 | PASS |
370
+ | 2 | random | 4.36 | 4.48 | 2.7 | 0.07 | 0.06 | -0.8 | 262224 | 262224 | 0.00 | PASS |
371
+ | 2 | repeat | 0.86 | 0.85 | -1.5 | 0.23 | 0.27 | 16.4 | 1047 | 1047 | 0.00 | FAIL (dec) |
372
+ | 2 | small | 8.98 | 8.74 | -2.7 | 4.08 | 3.96 | -3.0 | 151958 | 151958 | 0.00 | PASS |
373
+ | 3 | text | 2.56 | 2.81 | 9.6 | 0.65 | 0.64 | -1.6 | 60040 | 60040 | 0.00 | FAIL (enc) |
374
+ | 3 | source | 2.14 | 2.12 | -1.2 | 0.53 | 0.51 | -3.0 | 37669 | 37669 | 0.00 | PASS |
375
+ | 3 | json | 3.31 | 3.22 | -2.9 | 0.74 | 0.70 | -5.1 | 51783 | 51783 | 0.00 | PASS |
376
+ | 3 | random | 4.56 | 4.22 | -7.5 | 0.07 | 0.06 | -8.5 | 262224 | 262224 | 0.00 | PASS |
377
+ | 3 | repeat | 0.86 | 0.86 | 0.5 | 0.21 | 0.22 | 3.5 | 1047 | 1047 | 0.00 | PASS |
378
+ | 3 | small | 9.28 | 8.86 | -4.5 | 4.00 | 3.18 | -20.5 | 150890 | 150890 | 0.00 | PASS |
379
+ | 4 | text | 3.96 | 3.94 | -0.6 | 0.66 | 0.65 | -1.6 | 60041 | 60041 | 0.00 | PASS |
380
+ | 4 | source | 3.41 | 3.38 | -0.8 | 0.56 | 0.54 | -2.3 | 38117 | 38117 | 0.00 | PASS |
381
+ | 4 | json | 5.65 | 5.46 | -3.4 | 0.73 | 0.71 | -2.3 | 51779 | 51779 | 0.00 | PASS |
382
+ | 4 | random | 5.23 | 5.40 | 3.1 | 0.06 | 0.07 | 1.4 | 262224 | 262224 | 0.00 | PASS |
383
+ | 4 | repeat | 1.46 | 1.43 | -1.7 | 0.21 | 0.23 | 11.5 | 1047 | 1047 | 0.00 | FAIL (dec) |
384
+ | 4 | small | 9.36 | 7.95 | -15.0 | 5.03 | 5.18 | 2.9 | 151652 | 151652 | 0.00 | PASS |
385
+ | 5 | text | 2.86 | 2.83 | -1.0 | 0.72 | 0.70 | -1.7 | 59678 | 59678 | 0.00 | PASS |
386
+ | 5 | source | 2.39 | 2.37 | -0.6 | 0.60 | 0.60 | 0.2 | 37242 | 37242 | 0.00 | PASS |
387
+ | 5 | json | 3.92 | 3.90 | -0.5 | 0.74 | 0.67 | -9.7 | 50296 | 50296 | 0.00 | PASS |
388
+ | 5 | random | 4.53 | 4.35 | -4.0 | 0.06 | 0.06 | -1.3 | 262224 | 262224 | 0.00 | PASS |
389
+ | 5 | repeat | 0.84 | 0.84 | 0.2 | 0.21 | 0.21 | 0.2 | 1047 | 1047 | 0.00 | PASS |
390
+ | 5 | small | 9.98 | 8.26 | -17.2 | 4.36 | 5.35 | 22.7 | 150639 | 150639 | 0.00 | FAIL (dec) |
391
+ | 6 | text | 3.00 | 2.95 | -1.5 | 0.69 | 0.64 | -7.3 | 59597 | 59597 | 0.00 | PASS |
392
+ | 6 | source | 2.62 | 2.55 | -2.5 | 0.53 | 0.52 | -1.4 | 36870 | 36870 | 0.00 | PASS |
393
+ | 6 | json | 5.30 | 5.17 | -2.5 | 0.73 | 0.69 | -4.7 | 49048 | 49048 | 0.00 | PASS |
394
+ | 6 | random | 4.52 | 4.22 | -6.5 | 0.06 | 0.07 | 16.8 | 262224 | 262224 | 0.00 | FAIL (dec) |
395
+ | 6 | repeat | 0.92 | 0.84 | -8.9 | 0.20 | 0.21 | 2.9 | 1047 | 1047 | 0.00 | PASS |
396
+ | 6 | small | 10.45 | 8.56 | -18.1 | 4.10 | 4.16 | 1.6 | 150312 | 150312 | 0.00 | PASS |
397
+ | 7 | text | 2.92 | 2.94 | 0.6 | 0.69 | 0.66 | -5.0 | 59591 | 59591 | 0.00 | PASS |
398
+ | 7 | source | 2.81 | 2.77 | -1.4 | 0.51 | 0.49 | -3.0 | 36815 | 36815 | 0.00 | PASS |
399
+ | 7 | json | 5.73 | 6.03 | 5.1 | 0.72 | 0.69 | -4.5 | 48850 | 48850 | 0.00 | FAIL (enc) |
400
+ | 7 | random | 4.61 | 4.31 | -6.6 | 0.06 | 0.07 | 5.0 | 262224 | 262224 | 0.00 | PASS |
401
+ | 7 | repeat | 0.86 | 0.85 | -0.3 | 0.20 | 0.20 | 3.8 | 1047 | 1047 | 0.00 | PASS |
402
+ | 7 | small | 9.50 | 8.34 | -12.2 | 5.16 | 4.18 | -19.0 | 150232 | 150232 | 0.00 | PASS |
403
+ | 8 | text | 3.01 | 3.00 | -0.6 | 0.69 | 0.64 | -6.8 | 59590 | 59590 | 0.00 | PASS |
404
+ | 8 | source | 3.05 | 3.05 | -0.2 | 0.57 | 0.52 | -8.7 | 36768 | 36768 | 0.00 | PASS |
405
+ | 8 | json | 6.79 | 6.85 | 0.8 | 0.75 | 0.70 | -7.0 | 48755 | 48755 | 0.00 | PASS |
406
+ | 8 | random | 4.44 | 4.20 | -5.4 | 0.06 | 0.06 | -0.2 | 262224 | 262224 | 0.00 | PASS |
407
+ | 8 | repeat | 0.88 | 0.90 | 2.7 | 0.20 | 0.22 | 5.9 | 1047 | 1047 | 0.00 | FAIL (dec) |
408
+ | 8 | small | 10.25 | 9.32 | -9.1 | 3.52 | 4.72 | 34.1 | 150199 | 150199 | 0.00 | FAIL (dec) |
409
+ | 9 | text | 2.99 | 3.16 | 5.7 | 0.67 | 0.66 | -1.6 | 59590 | 59590 | 0.00 | FAIL (enc) |
410
+ | 9 | source | 3.21 | 3.19 | -0.7 | 0.55 | 0.50 | -7.9 | 36763 | 36763 | 0.00 | PASS |
411
+ | 9 | json | 6.72 | 6.78 | 0.8 | 0.76 | 0.76 | -0.2 | 48755 | 48755 | 0.00 | PASS |
412
+ | 9 | random | 4.78 | 4.50 | -5.9 | 0.07 | 0.06 | -14.4 | 262224 | 262224 | 0.00 | PASS |
413
+ | 9 | repeat | 0.85 | 0.84 | -1.0 | 0.20 | 0.21 | 9.0 | 1047 | 1047 | 0.00 | FAIL (dec) |
414
+ | 9 | small | 9.45 | 8.94 | -5.4 | 4.77 | 3.81 | -20.2 | 150199 | 150199 | 0.00 | PASS |
415
+
416
+ **43/54 PASS, 11/54 FAIL.** `Δbytes` is `+0.000 %` on every one of the 54
417
+ cells (the deflate codec's own bit-packing is untouched; only the
418
+ `huffman`/`bitstream` primitives underneath it changed). Every red cell is
419
+ a time cell, and it is the harness's own measurement noise: a later
420
+ measurement ruling accepted these cells as the measured floor, based on a
421
+ live-vs-live identical-code A/A run at the same parameters that puts
422
+ 10-21 of these 54 cells past `|5 %|`, while at `--reps 15` all
423
+ sub-millisecond and GC-heavy cells stabilise. The residual cells above are
424
+ accepted as the measurement floor, not a regression — the same acceptance
425
+ applies to `brotli.md`, `lz4.md`, `huffman.md` and `bitstream.md`.
426
+
427
+ ## Provenance
428
+
429
+ In-house implementation from RFC 1951; the earlier fflate-derived
430
+ implementation has since been replaced. The LZ77 matching pass is the
431
+ shared `lz77` module.
432
+
433
+ ## Example
434
+
435
+ ```js
436
+ const deflate = runtime.resolve('deflate');
437
+
438
+ const data = new TextEncoder().encode('Hello World '.repeat(500));
439
+
440
+ // Sync
441
+ const compressed = deflate.deflateSync(data, { level: 6 });
442
+ const decompressed = deflate.inflateSync(compressed);
443
+
444
+ // With dictionary (better compression for similar data)
445
+ const dict = new TextEncoder().encode('Hello World ');
446
+ const c = deflate.deflateSync(data, { level: 9, dictionary: dict });
447
+ const d = deflate.inflateSync(c, { dictionary: dict });
448
+ ```
449
+
450
+ ## Worker Usage
451
+
452
+ ```js
453
+ const worker = fw.createWorker(
454
+ function ({ libs, args }) {
455
+ const deflate = libs.deflate;
456
+ const compressed = deflate.deflateSync(args.data, { level: 6 });
457
+ self.postMessage(compressed, [compressed.buffer]);
458
+ },
459
+ { dependencies: ['deflate'], args: { data: new Uint8Array(largeData) } }
460
+ );
461
+ ```
462
+
463
+ ## Notes
464
+
465
+ - This module is the low-level primitive. For common usage, prefer [gzip](./gzip.md) or [zlib](./zlib.md) which add a header + checksum.
466
+ - The `DeflateStream` / `InflateStream` streams are reused internally by `gzip` and `zlib`.
467
+ - Both halves implement RFC 1951 §3.2.3–§3.2.7 directly — see [Design › Decoder](#decoder) for the table derivation, the block state machine and the resumability rule, and [Design › Encoder](#encoder) for the level table, the `lazy` opt-in, the block-cost rule and the streaming chunk contract; [Benchmark](#benchmark) carries the measured record against the pre-batch engine.
468
+
469
+ ## See also
470
+
471
+ - [gzip](./gzip.md) — DEFLATE + gzip header + CRC32
472
+ - [zlib](./zlib.md) — DEFLATE + zlib header + Adler32
473
+ - [zip](./zip.md) — multi-file archiving
474
+ - [lz77](./lz77.md) — the hash-chain matcher the encoder scans with
@@ -0,0 +1,130 @@
1
+ ---
2
+ module: gzip
3
+ category: io/compress
4
+ dependencies: [deflate, crc32]
5
+ returns: object
6
+ worker-safe: true
7
+ status: complete
8
+ ---
9
+
10
+ # gzip
11
+
12
+ > Gzip compression/decompression (RFC 1952) — DEFLATE + 10-byte header + CRC32. Standard HTTP format (`Content-Encoding: gzip`).
13
+
14
+ **Module** `gzip` | **Source** `packages/front/fw/src/io/compress/gzip.js` | **Deps** `deflate`, `crc32` | **Worker-safe** yes
15
+
16
+ ## Resolve
17
+
18
+ ```js
19
+ const gzip = runtime.resolve('gzip');
20
+ // Returns: { gzipSync, gunzipSync, gzip, gunzip, GzipStream, GunzipStream }
21
+ ```
22
+
23
+ ## API
24
+
25
+ ### Synchrone
26
+
27
+ ```js
28
+ const compressed = gzip.gzipSync(uint8Array, opts?); // → Uint8Array
29
+ const decompressed = gzip.gunzipSync(compressed, opts?); // → Uint8Array
30
+ ```
31
+
32
+ ### Asynchrone
33
+
34
+ ```js
35
+ const compressed = await gzip.gzip(uint8Array, opts?);
36
+ const decompressed = await gzip.gunzip(compressed, opts?);
37
+ ```
38
+
39
+ ### Streaming
40
+
41
+ ```js
42
+ // Compression
43
+ const parts = [];
44
+ const comp = new gzip.GzipStream(opts?, (chunk) => parts.push(chunk));
45
+ comp.push(data1);
46
+ comp.push(lastChunk, true);
47
+
48
+ // Decompression
49
+ const output = [];
50
+ const decomp = new gzip.GunzipStream(opts?, (chunk) => output.push(chunk));
51
+ decomp.push(gzChunk);
52
+ decomp.push(lastGzChunk, true);
53
+ ```
54
+
55
+ ## Options
56
+
57
+ ### Compression (`gzipSync`, `gzip`, `GzipStream`)
58
+
59
+ | Option | Type | Description |
60
+ |--------|------|-------------|
61
+ | `level` | `0–9` | Compression level (default: 6) |
62
+ | `filename` | `string` | Original filename (stored in the header) |
63
+ | `mtime` | `number \| Date` | Modification date (stored in the header) |
64
+
65
+ ### Decompression (`gunzipSync`, `gunzip`, `GunzipStream`)
66
+
67
+ | Option | Type | Description |
68
+ |--------|------|-------------|
69
+ | `out` | `Uint8Array` | Pre-allocated output buffer |
70
+ | `dictionary` | `Uint8Array` | Decompression dictionary |
71
+
72
+ ## Internal format (RFC 1952)
73
+
74
+ ```
75
+ [10-byte header] [DEFLATE payload] [CRC32 4B] [original size 4B]
76
+ ```
77
+
78
+ Header: magic `0x1F 0x8B`, method `0x08`, flags, mtime, XFL, OS (`3` = Unix).
79
+
80
+ ## Error codes
81
+
82
+ | Code | Meaning |
83
+ |------|---------|
84
+ | 6 | Invalid gzip data (incorrect magic bytes) |
85
+
86
+ ## Example
87
+
88
+ ```js
89
+ const gzip = runtime.resolve('gzip');
90
+ const utf8 = runtime.resolve('utf8');
91
+
92
+ const data = utf8.toBytes('Hello World '.repeat(1000));
93
+
94
+ // Compress with metadata
95
+ const compressed = gzip.gzipSync(data, {
96
+ level: 9,
97
+ filename: 'data.txt',
98
+ mtime: new Date()
99
+ });
100
+
101
+ // Decompress
102
+ const decompressed = gzip.gunzipSync(compressed);
103
+ console.log(utf8.fromBytes(decompressed));
104
+ ```
105
+
106
+ ## Worker usage
107
+
108
+ ```js
109
+ const worker = fw.createWorker(
110
+ async function({ libs, args }) {
111
+ const [rawData] = args;
112
+ const compressed = await libs.gzip.gzip(rawData);
113
+ self.postMessage({ compressed }, [compressed.buffer]);
114
+ },
115
+ { dependencies: ['gzip'], args: [data] }
116
+ );
117
+ ```
118
+
119
+ ## Notes
120
+
121
+ - Integrity checksum: CRC-32 (IEEE 802.3) computed on the uncompressed data — distinct from `zlib` which uses Adler-32.
122
+ - The gzip header stores an `mtime` (Unix timestamp) and optionally a `filename` — useful for interoperability with the system `gunzip`.
123
+ - Async methods use microtasks (no internal `Worker`) — they yield the main thread between compression blocks.
124
+
125
+ ## See also
126
+
127
+ - [deflate](./deflate.md) — underlying engine
128
+ - [zlib](./zlib.md) — zlib format (Adler32 instead of CRC32)
129
+ - [zip](./zip.md) — multi-file archiving
130
+ - [crc32](../calc/crc32.md)