@chunkd/source-file
TypeScript icon, indicating that this package has built-in type declarations

11.0.1 • Public • Published

@chunkd/source-file

Load chunks of data from a file using node:fs

Usage

import { pathToFileURL } from 'node:path';
import { SourceFile } from '@chunkd/source-file';

const source = new SourceFile(pathToFileURL('./cog.tif'));

// Read in the first 1KB of data
await source.fetch(0, 1024);

// Read the last 1KB of data
await source.fetch(-1024);

Advanced Usage

For caching, block alignment and fetch grouping see @chunkd/middleware and @chunkd/fs

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
11.0.1409latest

Version History

VersionDownloads (Last 7 Days)Published
11.0.1409
11.0.00
10.0.611
10.0.50
10.0.30
10.0.20
10.0.10
10.0.06
8.4.00
8.3.00
8.2.00
8.1.00
8.0.30
8.0.20
8.0.10
7.2.40
7.2.30
7.2.20
7.2.10
7.2.00
7.1.00
7.0.10
7.0.00
6.0.00
5.0.00
4.5.10
4.5.00
4.4.00

Package Sidebar

Install

npm i @chunkd/source-file

Weekly Downloads

330

Version

11.0.1

License

MIT

Unpacked Size

14.4 kB

Total Files

10

Last publish

Collaborators

  • blacha