{"_id":"@bun-win32/avifil32","_rev":"5-4696b334de9cfe54da1d0a8de7e2759b","name":"@bun-win32/avifil32","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/avifil32","version":"1.0.0","keywords":["bun","ffi","win32","windows","avifil32","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/avifil32@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"5bc28cd70ac0eb0374e3d1bccc3aad6f3053070e","tarball":"https://registry.npmjs.org/@bun-win32/avifil32/-/avifil32-1.0.0.tgz","fileCount":6,"integrity":"sha512-N+lW1OMc7UlHDRGVEZQPk+hKFB6mnMdkTQ7OcrFaonY0Na2g68z8itnyEt8k3uoVY9R7BpiU4XBJ+H6VliEp4w==","signatures":[{"sig":"MEUCIQCHgXrFEVKXHGaN4vEnNZ76Nwq6e091GR19sJJxCda8RAIgEUNvPGAVv+bBn47+Idmku6NCcupxABPKbNqr0gqRvN4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36376},"main":"./index.ts","type":"module","module":"index.ts","shasum":"5bc28cd70ac0eb0374e3d1bccc3aad6f3053070e","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:avi-inspector":"bun ./example/avi-inspector.ts","example:terminal-cinema":"bun ./example/terminal-cinema.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-N+lW1OMc7UlHDRGVEZQPk+hKFB6mnMdkTQ7OcrFaonY0Na2g68z8itnyEt8k3uoVY9R7BpiU4XBJ+H6VliEp4w==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/avifil32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 AVIFIL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.21"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/avifil32_1.0.0_1779072999578_0.6765301114523004","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/avifil32","version":"1.0.1","keywords":["bun","ffi","win32","windows","avifil32","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/avifil32@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"6d0feeaafb57c25504b0ac1889784b8c91a947e4","tarball":"https://registry.npmjs.org/@bun-win32/avifil32/-/avifil32-1.0.1.tgz","fileCount":6,"integrity":"sha512-xsO5tluaT+HMim4wr0DbJthkAteUiaWegt/kRD8/EEM9559xBXz/djwlvqQ9Mt8X7Jv8oOD9yMYZVi0QluyVog==","signatures":[{"sig":"MEUCIQCER+S4SCJmwTFDRZnGmQpT3u9eRnZj3O6JeQhnlowH5wIgRTcxP62HffsiHcbLSgYXWXF5heBAnzoyfuiQ3Nbk4rc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36390},"main":"./index.ts","type":"module","module":"index.ts","shasum":"6d0feeaafb57c25504b0ac1889784b8c91a947e4","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:avi-inspector":"bun ./example/avi-inspector.ts","example:terminal-cinema":"bun ./example/terminal-cinema.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-xsO5tluaT+HMim4wr0DbJthkAteUiaWegt/kRD8/EEM9559xBXz/djwlvqQ9Mt8X7Jv8oOD9yMYZVi0QluyVog==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/avifil32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 AVIFIL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.25"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/avifil32_1.0.1_1780581898394_0.5151737704953172","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bun-win32/avifil32","version":"1.0.2","keywords":["bun","ffi","win32","windows","avifil32","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/avifil32@1.0.2","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"08cc07a9c848f0c598804c6bfe63ffe639a13942","tarball":"https://registry.npmjs.org/@bun-win32/avifil32/-/avifil32-1.0.2.tgz","fileCount":6,"integrity":"sha512-OgxcIntBdGWURCVIzR2NbXszO2JMmabp3yaS570OSPm2LLGM2LRc2M/bYjvzGSWD9Jcm9QBbwydzV7HW1MaJqQ==","signatures":[{"sig":"MEQCICLgP9k2ujhWZ+tytfRS01DTveMxwyzi0qOJtmP/r5ZMAiAztQakZqPs4g0a5pQfX1UPOKwonO0zcZYLVOQ0ObuZXw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36395},"main":"./index.ts","type":"module","module":"index.ts","shasum":"08cc07a9c848f0c598804c6bfe63ffe639a13942","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:avi-inspector":"bun ./example/avi-inspector.ts","example:terminal-cinema":"bun ./example/terminal-cinema.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-OgxcIntBdGWURCVIzR2NbXszO2JMmabp3yaS570OSPm2LLGM2LRc2M/bYjvzGSWD9Jcm9QBbwydzV7HW1MaJqQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/avifil32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 AVIFIL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.26"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/avifil32_1.0.2_1781130782459_0.5515073905038992","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/avifil32","version":"2.0.0","keywords":["bun","ffi","win32","windows","avifil32","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/avifil32@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"f3c42f07246deada71e6172152238521e6d5a434","tarball":"https://registry.npmjs.org/@bun-win32/avifil32/-/avifil32-2.0.0.tgz","fileCount":6,"integrity":"sha512-uvzzortQ3MMikaKDiU8kY1hrpesVe7dtOCib2yAM1bYnCopC/dAzmktOC93MfRd+cfItb6HJ+l8cjM+Me0cLiQ==","signatures":[{"sig":"MEUCIGglWUgWBAqhDu6D4c7nU/WAqts4aO/N0Z+2q1JSbwYHAiEApJpRj3EYrqZ9WgjFHflhk92BkgFdA2e3TBNow1DJ3lA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38190},"main":"./index.ts","type":"module","module":"index.ts","shasum":"f3c42f07246deada71e6172152238521e6d5a434","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:avi-inspector":"bun ./example/avi-inspector.ts","example:terminal-cinema":"bun ./example/terminal-cinema.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-uvzzortQ3MMikaKDiU8kY1hrpesVe7dtOCib2yAM1bYnCopC/dAzmktOC93MfRd+cfItb6HJ+l8cjM+Me0cLiQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/avifil32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 AVIFIL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"2.0.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/avifil32_2.0.0_1782435267193_0.04424277894676565","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 AVIFIL32 bindings for Bun (FFI) on Windows.","devDependencies":{"@bun-win32/kernel32":"2.0.1","@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/avifil32","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/avifil32"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","avifil32","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:avi-inspector":"bun ./example/avi-inspector.ts","example:terminal-cinema":"bun ./example/terminal-cinema.ts"},"_id":"@bun-win32/avifil32@2.0.1","_integrity":"sha512-DlmjJhDfTJaTQzy6ePwirA1iGzIkZ7eC9Z9myVJUZ5oLdYFo2wH6umH0qbQDJCcTRkp3tfai97scBBuz7pBvkQ==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"7ad736a21e9bba1ad9512f122d003f07fd1c331b","dist":{"integrity":"sha512-DlmjJhDfTJaTQzy6ePwirA1iGzIkZ7eC9Z9myVJUZ5oLdYFo2wH6umH0qbQDJCcTRkp3tfai97scBBuz7pBvkQ==","shasum":"7ad736a21e9bba1ad9512f122d003f07fd1c331b","tarball":"https://registry.npmjs.org/@bun-win32/avifil32/-/avifil32-2.0.1.tgz","fileCount":6,"unpackedSize":38190,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPdY4qBEsSJ5wkRlRaSKIh/Uqm52hX1wXpwEiVISsJTAIgA2vxUuAYfDUmZdLEYx6EXpdDP+Chb3psDOZF9mvNw6w="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/avifil32_2.0.1_1782437721841_0.9542717120216568"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T02:56:39.414Z","modified":"2026-06-26T01:35:22.109Z","1.0.0":"2026-05-18T02:56:39.740Z","1.0.1":"2026-06-04T14:04:58.559Z","1.0.2":"2026-06-10T22:33:02.595Z","2.0.0":"2026-06-26T00:54:27.330Z","2.0.1":"2026-06-26T01:35:21.979Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","avifil32","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/avifil32"},"description":"Zero-dependency, zero-overhead Win32 AVIFIL32 bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/avifil32\r\n\r\nZero-dependency, zero-overhead Win32 Avifil32 bindings for [Bun](https://bun.sh) on Windows.\r\n\r\n## Overview\r\n\r\n`@bun-win32/avifil32` exposes the `avifil32.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Avifil32`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\r\n\r\nThe bindings are strongly typed for a smooth DX in TypeScript.\r\n\r\n## Features\r\n\r\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\r\n- Direct FFI to `avifil32.dll` (Video for Windows AVIFile API: open/create `.avi` files, enumerate and read/write video, audio, MIDI, and text streams, decode frames to DIBs, mux files from streams, and edit streams).\r\n- In-source docs in `structs/Avifil32.ts` with links to Microsoft Docs.\r\n- Lazy binding on first call; optional eager preload (`Avifil32.Preload()`).\r\n- No wrapper overhead; calls map 1:1 to native APIs.\r\n- Strongly-typed Win32 aliases (see `types/Avifil32.ts`).\r\n\r\n## Requirements\r\n\r\n- [Bun](https://bun.sh) runtime\r\n- Windows 10 or later\r\n\r\n## Installation\r\n\r\n```sh\r\nbun add @bun-win32/avifil32\r\n```\r\n\r\n## Quick Start\r\n\r\n```ts\r\nimport Avifil32, { OpenFileFlags, StreamType } from '@bun-win32/avifil32';\r\n\r\n// Optionally bind a subset up-front\r\nAvifil32.Preload(['AVIFileInit', 'AVIFileOpenW', 'AVIFileInfoW', 'AVIFileRelease', 'AVIFileExit']);\r\n\r\nAvifil32.AVIFileInit();\r\n\r\n// AVIFileOpenW writes the IAVIFile pointer into a caller-allocated buffer\r\nconst ppfile = Buffer.alloc(8);\r\nconst path = Buffer.from('C:\\\\\\\\sample.avi\\0', 'utf16le');\r\nconst hr = Avifil32.AVIFileOpenW(ppfile.ptr, path.ptr, OpenFileFlags.OF_READ | OpenFileFlags.OF_SHARE_DENY_NONE, null);\r\n\r\nif (hr === 0) {\r\n  const pfile = ppfile.readBigUInt64LE(0);\r\n\r\n  // AVIFILEINFOW is 172 bytes on x64; dwStreams is at offset 12\r\n  const info = Buffer.alloc(172);\r\n  Avifil32.AVIFileInfoW(pfile, info.ptr, info.byteLength);\r\n  console.log('Streams: %d', info.readUInt32LE(12));\r\n\r\n  Avifil32.AVIFileRelease(pfile);\r\n}\r\n\r\nAvifil32.AVIFileExit();\r\n```\r\n\r\n> [!NOTE]\r\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\r\n\r\n## Examples\r\n\r\nRun the included examples:\r\n\r\n```sh\r\n# Decode a synthesized .avi and play it back in the terminal with 24-bit ANSI\r\nbun run example/terminal-cinema.ts\r\n\r\n# Thorough AVI container diagnostic (pass a path, or a sample is synthesized)\r\nbun run example/avi-inspector.ts [path-to.avi]\r\n```\r\n\r\n## Notes\r\n\r\n- Either rely on lazy binding or call `Avifil32.Preload()`.\r\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}