1.0.0-alpha.22 • Published 2 months ago
@guanghechen/file-split v1.0.0-alpha.22
A collection of utility functions for handling files, such as split big file or merge multiple small files.
Install
npm
npm install --save @guanghechen/file-split
yarn
yarn add @guanghechen/file-split
Usage
BigFileHelper
(inspired by file-split)import { bigFileHelper, calcFilePartItemsBySize } from '@guanghechen/file-split' async function splitFile(filepath: string): Promise<string[]> { const parts = calcFilePartItemsBySize(filepath, 1024 * 1024 * 80) // 80MB per chunk const partFilepaths: string[] = await bigFileHelper.split(filepath, parts) return partFilepaths } splitFile('big-file.txt')
Overview
Name | Description |
---|---|
BigFileHelper | A utility class for split / merging big files |
bigFileHelper | Default instance of BigFleHelper |
calcFilePartItemsBySize | Generate file part items by part size |
calcFilePartItemsByCount | Generate file part items by total of parts |
calcFilePartNames | Generate file part names (suffix) |
1.0.0-alpha.22
2 months ago
1.0.0-alpha.21
2 months ago
1.0.0-alpha.20
3 months ago
1.0.0-alpha.19
4 months ago
1.0.0-alpha.18
4 months ago
1.0.0-alpha.17
5 months ago
1.0.0-alpha.16
5 months ago
1.0.0-alpha.15
5 months ago
1.0.0-alpha.14
5 months ago
1.0.0-alpha.13
5 months ago
1.0.0-alpha.12
5 months ago
1.0.0-alpha.11
6 months ago
1.0.0-alpha.10
6 months ago
1.0.0-alpha.9
6 months ago
1.0.0-alpha.8
6 months ago
1.0.0-alpha.7
6 months ago
1.0.0-alpha.6
6 months ago
1.0.0-alpha.5
7 months ago
1.0.0-alpha.4
7 months ago
1.0.0-alpha.3
7 months ago
1.0.0-alpha.2
7 months ago
1.0.0-alpha.1
7 months ago