chunk-store-stream

WebJar for chunk-store-stream

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

chunk-store-stream
Last Version

Last Version

3.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

chunk-store-stream
WebJar for chunk-store-stream
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/feross/chunk-store-stream

Download chunk-store-stream

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/chunk-store-stream/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>chunk-store-stream</artifactId>
    <version>3.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/chunk-store-stream/
implementation 'org.webjars.npm:chunk-store-stream:3.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/chunk-store-stream/
implementation ("org.webjars.npm:chunk-store-stream:3.0.1")
'org.webjars.npm:chunk-store-stream:jar:3.0.1'
<dependency org="org.webjars.npm" name="chunk-store-stream" rev="3.0.1">
  <artifact name="chunk-store-stream" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='chunk-store-stream', version='3.0.1')
)
libraryDependencies += "org.webjars.npm" % "chunk-store-stream" % "3.0.1"
[org.webjars.npm/chunk-store-stream "3.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : block-stream2 jar [1.0.0,2)
org.webjars.npm : readable-stream jar [2.0.5,3)

Project Modules

There are no modules declared in this project.

chunk-store-stream travis npm downloads javascript style guide

Convert an abstract-chunk-store store into a readable or writable stream

abstract chunk store

Read/write data from/to a chunk store, with streams.

Install

npm install chunk-store-stream

Usage

Create a read stream

const { ChunkStoreReadStream } = require('chunk-store-stream')
const FSChunkStore = require('fs-chunk-store') // any chunk store will work

const chunkLength = 3
const store = new FSChunkStore(chunkLength)

// ... put some data in the store

const stream = new ChunkStoreReadStream(store, chunkLength, { length: 6 })
stream.pipe(process.stdout)

Create a write stream

const { ChunkStoreWriteStream } = require('chunk-store-stream')
const FSChunkStore = require('fs-chunk-store') // any chunk store will work
const fs = require('fs')

const chunkLength = 3
const store = new FSChunkStore(chunkLength)

const stream = new ChunkStoreWriteStream(store, chunkLength)
fs.createReadStream('file.txt').pipe(stream)

License

MIT. Copyright (c) Feross Aboukhadijeh.

Versions

Version
3.0.1