Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

texture-codec

Latest version: v0.3.0

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: krapnik
0 Stars
0 Forks
5 Versions
358 Downloads
TypeScript Repo language

Scan summary

texture-codec was last scanned on 1 Dec 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions, all published within 6 days (26 Nov – 1 Dec 2026).
  • Findings: 1 rule fired in version 0.3.0 (14 instances: 14 low). The score describes this version only.
  • Downloads: 358 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.0 LATEST 1 Dec 2026 1 rule fired
0.2.0 1 Dec 2026 1 rule fired
0.1.1 1 Dec 2026 1 rule fired
0.1.0 26 Nov 2026 Not shown
0.0.0-stage 26 Nov 2026 Not shown

Rules fired in 0.3.0: 1

Findings

14 Low

Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 14 findings with descriptions and instance counts

The score describes 0.3.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

texture-codec

100% OSI-licensed, zero-dependency pure-ESM GPU texture codec, container protocol parser, Texture Doctor, and cancelable Module Worker SDK for Node >= 20, Vite, and Browsers.

Supports all 8 GPU texture containers (ASTC, Basis, CRN, DDS, KTX, KTX2, PKM, PVR), including ASTC/BC6H HDR, BC1–BC7, ETC1/ETC2/EAC (including signed EAC via Apache-2.0 etc2comp + ISC detex), PVRTC, and Basis/KTX2 UASTC/ETC1S.

Install

pnpm add texture-codec
# or: npm install texture-codec

Subpath Exports

Entrypoint Purpose WASM Included in Bundle?
texture-codec Default all-in-one entry (core + codecs), zero-config in Node >= 20 and Vite Lazy per-codec
texture-codec/core (also /protocols, /capabilities, /doctor, /archive, /errors) Pure TS container protocols (ASTC, Basis, DDS, KTX, PKM, PVR), CODEC_REGISTRY, Texture Doctor, ZIP builder, HDR tone mapper, TextureCodecError No (0 WASM, 0 DOM)
texture-codec/codecs / /codecs/{astc,basis,crn,dds,ktx,ktx2,pkm,pvr} Tree-shakeable single-container plugins + createTextureCodecFacade Only imported codecs
texture-codec/codecs/cdn External CDN / self-hosted WASM facade (zero .wasm bundled into app build) No
texture-codec/decoders / /decoders/cdn / /decoders/{facade,astc,basis,crn,dds,ktx,ktx2,pkm,pvr} Decode-only container subpaths & TextureDecodeFacade (zero *Encoder, zero CompressorRegistry, zero encoder WASMs) Decode-only WASMs (cdn & per-format: No)
texture-codec/decompressors / /decompressors/{astc,bcn,etc,pvrtc,raw} Pure block-level decompressors routed to lightweight *-decoder / bcdec WASMs without _malloc/_free glue No (configure via runtime or /decoders)
texture-codec/worker Zero-config Web Module Worker pool (TextureCodecWorkerFacade) for Vite Lazy per-codec
texture-codec/worker/pool & /worker/worker-cdn Custom-worker pool (TextureCodecWorkerPool, attachTextureCodecWorker) for Next.js / CDN with zero duplicate .wasm emission No
texture-codec/wasm & /wasm/{astc-decoder,etc-decoder,crunch-decoder,bcdec,astc,etc,bcn,ktx2,...} Typed pure-ES6 Emscripten factories (including lightweight decode-only modules with ≤ 4 MB initial linear memory), wasmUrl, provenance.json, sbom.cdx.json Direct WASM assets

Runtime Quickstarts

1. Node >= 20 (Pure ESM, Zero-Config)

The node conditional export automatically wires node:fs/promises for bundled .wasm loading—no baseUrl or fetch polyfill needed.

import {
  inspectTextureContainer,
  sniffTextureContainer,
  textureCodecFacade,
} from 'texture-codec';

const rgba = { width: 64, height: 64, data: new Uint8Array(64 * 64 * 4) };

// Encode to KTX2 (UASTC)
const encoded = await textureCodecFacade.encode('ktx2', rgba, { format: 'UASTC' });
console.log(sniffTextureContainer(encoded.data)); // 'ktx2'
console.log(inspectTextureContainer(encoded.data));

// Decode preview (RGBA8) or structured TextureAsset (mips / layers / faces / float)
const preview = await textureCodecFacade.decodePreview('ktx2', encoded.data);
const asset = await textureCodecFacade.decodeAsset('ktx2', encoded.data);
2. Vite (Dev + Production Build + Module Worker)

Add optimizeDeps.exclude and worker.format = 'es' in vite.config.ts so Vite preserves import.meta.url WASM assets and ES Module Worker code-splitting:

// vite.config.ts
import { defineConfig } from 'vite';

export default defineConfig({
  optimizeDeps: {
    exclude: ['texture-codec'],
  },
  worker: {
    format: 'es',
  },
  build: {
    target: 'es2022',
  },
});
import { TextureCodecWorkerFacade } from 'texture-codec/worker';

const worker = new TextureCodecWorkerFacade({ maxWorkers: 2 });

const encoded = await worker.encode('dds', rgba, { format: 'BC7' });
const compared = await worker.compareFormat('astc', rgba, { blockX: 4, blockY: 4 });
console.log('PSNR (dB):', compared.metrics.psnrRgb);

worker.dispose();
3. Next.js / Browser / Custom CDN Hosting (Zero Duplicate .wasm Emission)

When hosting WASM files externally (e.g., public/assets/wasm or a CDN), import from texture-codec/codecs/cdn and texture-codec/worker/pool so Next.js / Turbopack emits zero duplicate .wasm copies into _next/static/media:

// app-codec.worker.ts
import {
  TextureCodecFacade,
  configureWasmRuntime,
  decodeHdrComparePixels,
} from 'texture-codec/codecs/cdn';
import { attachTextureCodecWorker } from 'texture-codec/worker/pool';

configureWasmRuntime({
  baseUrl: '/assets/wasm',
  cacheKey: process.env.NEXT_PUBLIC_WASM_VERSION,
});

attachTextureCodecWorker({
  facade: new TextureCodecFacade(),
  configureWasmRuntime,
  decodeHdrComparePixels,
});
// Main thread pool
import { TextureCodecWorkerPool } from 'texture-codec/worker/pool';

const pool = new TextureCodecWorkerPool({
  workerFactory: () => new Worker(new URL('./app-codec.worker.ts', import.meta.url)),
  maxWorkers: 2,
  wasm: { baseUrl: '/assets/wasm', cacheKey: process.env.NEXT_PUBLIC_WASM_VERSION },
});
4. Tree-Shakeable Single-Container & Decode-Only Usage
// Decode-only all-container viewer (excludes all 7 encoder WASMs & all *Encoder code)
import { textureDecodeFacade } from 'texture-codec/decoders';

const preview = await textureDecodeFacade.decodeAuto(fileBytes);
// Single-format decode-only bundle (e.g. ASTC only: emits only 42 KB astc-decoder.wasm)
import { registerBundledWasmLoaders } from 'texture-codec/codecs/runtime';
import { TextureDecodeFacade } from 'texture-codec/decoders/facade';
import { createAstcDecoder } from 'texture-codec/decoders/astc';

registerBundledWasmLoaders({
  'astc-decoder': () => import('texture-codec/wasm/astc-decoder'),
});

const astcViewer = new TextureDecodeFacade({ decoders: [createAstcDecoder()] });
const decoded = await astcViewer.decodePreview('astc', astcBytes);
// Full encode + decode single-container plugin (lazy-loadable on export dialog)
import { createTextureCodecFacade } from 'texture-codec/codecs';
import { createAstcCodec } from 'texture-codec/codecs/astc';

const astcOnly = createTextureCodecFacade({
  codecs: [createAstcCodec()],
});

Supply Chain & 100% OSI Licensing

Every shipped WASM binary is built from pinned official upstream commits (third_party/* gitlinks in .gitmodules) plus small, auditable in-repo patches (scripts/wasm/patches/) and native C/C++ glue (scripts/wasm/native/).

  • Zero personal forks: All upstream components point directly to official repositories.
  • Zero non-OSI codecs: Legacy non-OSI ETCPACK has been retired and replaced by google/etc2comp (Apache-2.0) + hglm/detex (ISC), and libktx is compiled with -DLIBKTX_FEATURE_ETC_UNPACK=OFF.
  • Verifiable artifacts: See docs/wasm-provenance.json, docs/wasm-sbom.cdx.json, and THIRD_PARTY_NOTICES.md.

Development & Verification

pnpm install
pnpm run build             # Build JS/DTS (tsup) + WASM wrappers (tsc)
pnpm run typecheck         # Type-check all source & WASM modules
pnpm run lint:pkg          # Run publint (--strict) + attw (--profile esm-only) on packed tarball
pnpm run wasm:provenance   # Verify SHA-256 hashes, strict-CSP glue & decode memory limits of all 28 WASM artifacts
pnpm run wasm:dependencies # Verify frozen codec & upstream pin policy
pnpm run test:node         # Verify Node >= 20 pure ESM across all 8 containers, HDR & signed EAC
pnpm run test:pack         # Verify offline isolated tarball consumer
pnpm run test:vite         # Verify Vite production build + Headless Chrome Dev/Preview Worker E2E
Rebuilding WASM from Source
git submodule update --init --recursive
pnpm run verify:wasm-source
pnpm run wasm:build

License

MIT — see LICENSE and THIRD_PARTY_NOTICES.md for bundled third-party WASM component licenses.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm texture-codec

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229