Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
mtth committed May 10, 2017
1 parent f6ecf1f commit ba095a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ const avro = require('avsc');
```

+ Get a [readable stream][readable-stream] of decoded values from an Avro
container file compressed using Snappy:
container file compressed using [Snappy][snappy] (see the [`BlockDecoder`
API][decoder-api] for an example including checksum validation):

```javascript
const snappy = require('snappy'); // Or your favorite Snappy library.
const codecs: {
const codecs = {
snappy: function (buf, cb) {
// Avro appends checksums to compressed blocks, which we skip here.
return snappy.uncompress(buf.slice(0, buf.length - 4), cb);
Expand Down Expand Up @@ -114,16 +115,18 @@ const avro = require('avsc');
```


[node.js]: https://nodejs.org/en/
[benchmarks]: https://github.com/mtth/avsc/wiki/Benchmarks
[type-inference]: https://github.com/mtth/avsc/wiki/Advanced-usage#type-inference
[schema-evolution]: https://github.com/mtth/avsc/wiki/Advanced-usage#schema-evolution
[logical-types]: https://github.com/mtth/avsc/wiki/Advanced-usage#logical-types
[custom-long]: https://github.com/mtth/avsc/wiki/Advanced-usage#custom-long-types
[readable-stream]: https://nodejs.org/api/stream.html#stream_class_stream_readable
[browserify]: http://browserify.org/
[browser-support]: https://github.com/mtth/avsc/wiki#browser-support
[browserify]: http://browserify.org/
[custom-long]: https://github.com/mtth/avsc/wiki/Advanced-usage#custom-long-types
[decoder-api]: https://github.com/mtth/avsc/wiki/API#class-blockdecoderopts
[home]: https://github.com/mtth/avsc/wiki
[rpc]: https://github.com/mtth/avsc/wiki/Quickstart#services
[releases]: https://github.com/mtth/avsc/releases
[idl]: https://avro.apache.org/docs/current/idl.html
[logical-types]: https://github.com/mtth/avsc/wiki/Advanced-usage#logical-types
[node.js]: https://nodejs.org/en/
[readable-stream]: https://nodejs.org/api/stream.html#stream_class_stream_readable
[releases]: https://github.com/mtth/avsc/releases
[rpc]: https://github.com/mtth/avsc/wiki/Quickstart#services
[schema-evolution]: https://github.com/mtth/avsc/wiki/Advanced-usage#schema-evolution
[snappy]: https://avro.apache.org/docs/current/spec.html#snappy
[type-inference]: https://github.com/mtth/avsc/wiki/Advanced-usage#type-inference
2 changes: 1 addition & 1 deletion doc
Submodule doc updated from 2e41ec to 18c42f

0 comments on commit ba095a6

Please sign in to comment.