git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
6e9c872
Branches
Tags
develop-client_server
master
typescript
fs-words.git
server
lib
node_modules
needle
examples
deflated-stream.js
[add] server:lib:node_modules
Christian Fraß
commited
6e9c872
at 2021-03-08 23:52:07
deflated-stream.js
Blame
History
Raw
var fs = require('fs'), stream = require('stream'), needle = require('./../'); var url = 'http://ibl.gamechaser.net/f/tagqfxtteucbuldhezkz/bt_level1.gz'; var resp = needle.get(url, { compressed: true, follow_max: 10 }); console.log('Downloading...'); resp.on('readable', function() { while (data = this.read()) { var lines = data.toString().split('\n'); console.log('Got ' + lines.length + ' items.'); // console.log(lines); } }) resp.on('done', function(data) { console.log('Done'); })