@gpu-tex-enc/bc

中文文档
1.0.11发布于 2024/02/16Apache-2.0TypeScriptCommonJS零依赖近 30 天下载 7万

Compressing images using the BC1 (DXT1), BC2 (DXT3), BC3 (DXT5), BC4, BC5 & BC7 texture compression standard.

原始使用文档
文档目录7 节
  1. Description
  2. Features
  3. Installation
  4. Usage
  5. Binaries
  6. Repository
  7. License

@gpu-tex-enc/bc

Compressing images using the BC1 (DXT1), BC2 (DXT3), BC3 (DXT5), BC4, BC5 & BC7 texture compression standard.

bc7enc v1.0.8

Description

@gpu-tex-enc/bc is a Node.js module designed for efficient image compression using a variety of BC (Block Compression) standards. It supports BC1 (DXT1), BC2 (DXT3), BC3 (DXT5), BC4, BC5, and BC7 formats, catering to different requirements and providing versatile compression options for GPU textures.

Features

  • Supports multiple BC texture compression formats.
  • Optimized for performance and quality.
  • Cross-platform compatibility with pre-compiled bc7enc binaries for Linux, Windows, and Darwin.

Installation

Install the module via npm:

npm install @gpu-tex-enc/bc

Usage

To use this module in your Node.js project, simply require it:

const bcCompressor = require('@gpu-tex-enc/bc');

// Example usage

Binaries

The package includes the following pre-compiled binaries:

  • Linux: bc7enc-linux (located in ./bin/linux/bc7enc)
  • Windows: bc7enc-win32 (located in ./bin/win32/bc7enc.exe)
  • Darwin: bc7enc-darwin-{x64|arm64} (located in ./bin/darwin-{x64|arm64}/bc7enc)

Repository

The source code is available on GitHub:

github.com/ddenisyuk/gpu-tex-enc

License

Licensed under the Apache-2.0 License.

版本与发布记录

@gpu-tex-enc/bc 共发布 4 个版本,首次发布于 2023/12/03;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.11latest2024/02/162 年前
1.0.102024/02/162 年前
1.0.92023/12/042 年前
1.0.82023/12/032 年前

关于 @gpu-tex-enc/bc 的常见问题

@gpu-tex-enc/bc 是什么?

Compressing images using the BC1 (DXT1), BC2 (DXT3), BC3 (DXT5), BC4, BC5 & BC7 texture compression standard.

如何安装 @gpu-tex-enc/bc?

在项目目录运行 npm install @gpu-tex-enc/bc,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bc7enc-linux、bc7enc-win32、bc7enc-darwin-x64、bc7enc-darwin-arm64,可以用 npx bc7enc-linux 直接运行。

@gpu-tex-enc/bc 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@gpu-tex-enc/bc 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@gpu-tex-enc/bc 可以商用吗?

@gpu-tex-enc/bc 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@gpu-tex-enc/bc 的下载量有多少?

根据 npm 官方下载统计,@gpu-tex-enc/bc 在 2026/10/17 – 2026/11/15 这 30 天内被下载 70,200 次,日均约 2,340 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gpu-tex-enc/bc 还在维护吗?

最新版本 1.0.11 发布于 2024/02/16(2 年前);至今共发布 4 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/12/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。