npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amoeba/libac

v0.2.3

Published

Library for working with Asheron's Call data structures and protocols.

Readme

libac

TypeScript library for reading Asheron's Call DAT data structures and related HTTP responses.

  • Low-level binary reader (BinaryReader) and DAT models/types.
  • Parsers for portal and cell DAT file types: GfxObj, Setup, Texture, Surface, SurfaceTexture, Palette, Region, Scene, CellLandblock, LandblockInfo, EnvCell, Environment, MotionTable, Animation.
  • Length-correct animation hooks (AnimationFrame, readAnimationHook, all 27 AnimationHookType payloads), reusable by PhysicsScript (0x33).
  • multipart/mixed HTTP response parsing (extractBoundary, parseMultipartMixed).
  • Node-only, filesystem-backed DAT access (SeekableFileReader, DatDatabase, DatReader).

Installation

npm install @amoeba/libac

The package is ESM-only and requires Node.js 18 or newer. A SideEffects-free browser-safe (universal) build is included for bundlers.

Which entrypoint?

| Entrypoint | Environment | What it includes | | --- | --- | --- | | @amoeba/libac | Browser / universal | Everything that is safe in any JS runtime: BinaryReader, DatFile/DatFileType, GfxObj, Setup, SpellTable, Texture, MotionTable, Animation, the dat/types models, the unpackables, and the multipart helpers. No Node built-ins, Buffer, or fs. | | @amoeba/libac/node | Node.js | The entire universal API plus the filesystem-backed DAT reading: SeekableFileReader, DatDatabase, DatReader. |

The /node entry re-exports everything from the root entry, so in Node you can import your whole API from @amoeba/libac/node.

Browser DAT file reading is not supported yet — it will require an HTTP-Range-based reader in a future release. In the browser you can still parse in-memory buffers (GfxObj.fromBuffer, Setup.fromBuffer) and the multipart helpers.

Usage

Browser / universal

GfxObj.fromBuffer and Setup.fromBuffer accept either a Uint8Array or an ArrayBuffer. Multipart helpers operate on Uint8Array/ArrayBuffer bytes.

import {
  GfxObj,
  Setup,
  extractBoundary,
  parseMultipartMixed,
} from "@amoeba/libac";

// Parse an in-memory DAT file buffer.
const setup = Setup.fromBuffer(setupBytes);
const gfxObj = GfxObj.fromBuffer(gfxObjBytes);

console.log(setup.parts);      // referenced GfxObj IDs
console.log(gfxObj.surfaces);  // texture references

// Parse a multipart/mixed response body.
const boundary = extractBoundary(contentType);
if (boundary) {
  const parts = parseMultipartMixed(responseBytes, boundary);
  for (const part of parts) {
    console.log(part.fileId, part.filename, part.body);
  }
}

Node.js

Import from the /node subpath to get the universal API plus DAT reading from a file on disk.

import { DatDatabase, GfxObj } from "@amoeba/libac/node";

const db = new DatDatabase("path/to/portal.dat");
db.read(); // reads the header and root directory

// ...use db.reader / db.header / db.rootDir to locate and load file data...

db.close();