Skip to content

CloudPSS/mmap

Repository files navigation

@cloudpss/mmap

check Codacy coverage Codacy Badge npm version

This is a pure esm package contains the mmap n-api addon for node.js.

Installation

npm install @cloudpss/mmap

Usage

import { mmap } from '@cloudpss/mmap';

const buffer = mmap('/file/to/mmap');

API

mmap(file: string, length?: number): Buffer

mmap<T>(view: new (buffer: ArrayBufferLike) => T, path: string, length?: number): T

License

MIT