Commit 81642b10bd4a0105dae4a0d01429420d3ddb2016
Merge pull request #48 from noffle/examples
Add 1:1 read note & examples linksYoshua Wuyts committed on 5/31/2016, 8:48:41 PM
Parent: 50e5054825a29cc311d60ebc10d916f6c5029d4c
Parent: ed45628851efaa1b5422242c4489bb123993cc9f
Files changed
README.md | changed |
README.md | ||
---|---|---|
@@ -287,7 +287,30 @@ | ||
287 | 287 | |
288 | 288 | There either is data flowing (4) OR you have the error/abort cases (1-3), never both. |
289 | 289 | |
290 | 290 | |
291 | +## 1:1 read-callback ratio | |
292 | + | |
293 | +A pull stream source (and thus transform) returns *exactly one value* per read. | |
294 | + | |
295 | +This differs from node streams, which can use `this.push(value)` and in internal | |
296 | +buffer to create transforms that write many values from a single read value. | |
297 | + | |
298 | +Pull streams don't come with their own buffering mechanism, but [there are ways | |
299 | +to get around this](https://github.com/dominictarr/pull-stream-examples/blob/master/buffering.js). | |
300 | + | |
301 | + | |
302 | +## Further Examples | |
303 | + | |
304 | +- https://github.com/dominictarr/pull-stream-examples | |
305 | +- https://github.com/pull-stream/pull-stream/blob/master/examples.md | |
306 | + | |
307 | +Explore this repo further for more information about | |
308 | +[sources](https://github.com/pull-stream/pull-stream/tree/master/sources), | |
309 | +[throughs](https://github.com/pull-stream/pull-stream/tree/master/throughs), | |
310 | +[sinks](https://github.com/pull-stream/pull-stream/tree/master/sinks), and | |
311 | +[more](https://github.com/pull-stream/pull-stream/tree/master/docs). | |
312 | + | |
313 | + | |
291 | 314 | ## License |
292 | 315 | |
293 | 316 | MIT |
Built with git-ssb-web