Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

s3-readstream

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s3-readstream - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "s3-readstream",
"version": "0.0.2",
"version": "0.0.3",
"description": "AWS s3 readable stream made easy",

@@ -5,0 +5,0 @@ "main": "dist/S3Readstream.js",

# s3-readstream
AWS S3 Read Stream made easy
Simple wrapper around AWS S3 `getObject()` call to grab a range of bytes allowing smooth and stable streaming!
Simple wrapper around [AWS S3 getObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) call to grab a range of bytes allowing smooth and stable streaming!
* Simple interface for streaming any size file from AWS S3
* Easily speed-up, and slow down, the streaming at any point
* All of the functionaly you love with NodeJS Readable streams
* Drop in replacement for `AWS.S3.getObject().createReadStream()`
```

@@ -29,3 +33,3 @@ npm install s3-readstream

};
// Instantiate the S3ReadStream in place of s3.getObject().createReadStream()!
// Instantiate the S3ReadStream in place of s3.getObject().createReadStream()
const stream = new S3ReadStream(options);

@@ -40,9 +44,20 @@ });

You can alse use this `stream` like any other NodeJS Readable stream, setting an event listener is exactly the same:
You can alse use this `stream` like any other [NodeJS Readable stream](https://nodejs.org/api/stream.html#readable-streams), setting an event listener is exactly the same:
```js
stream.on('error', error => {
// Handle error
stream.on('data', (chunk) => {
console.log(`read: ${chunk.toString()}`);
});
stream.on('end', () => {
console.log('end');
});
```
Use this with `zlib` to handle zipped files!
```js
import {createGunzip} from 'zlib';
const gzip = createGunzip();
// pipe into gzip to unzip files as you stream!
stream.pipe(gzip)
```
You can test this stream in an [example HD video app](https://github.com/about14sheep/awsstreaming) and read a [blog on its origins](https://dev.to/about14sheep/streaming-data-from-aws-s3-using-nodejs-stream-api-and-typescript-3dj0).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc