https://github.com/pconstr/rdb-parser
node.js asynchronous streaming parser for redis RDB database dumps
https://github.com/pconstr/rdb-parser
Last synced: 4 months ago
JSON representation
node.js asynchronous streaming parser for redis RDB database dumps
- Host: GitHub
- URL: https://github.com/pconstr/rdb-parser
- Owner: pconstr
- License: mit
- Created: 2012-01-12T22:08:46.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-07-26T15:35:26.000Z (over 13 years ago)
- Last Synced: 2025-10-11T09:31:24.206Z (5 months ago)
- Language: JavaScript
- Homepage: http://perceptiveconstructs.com
- Size: 140 KB
- Stars: 41
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
- awesome-redis - Rdb-parser - node.js asynchronous streaming parser for redis RDB database dumps. (Javascript) (Higher level libraries and tools)
README
rdb-parser
----------
[node.js](http://nodejs.org/) asynchronous streaming parser for [redis](http://redis.io) RDB database dumps, written in 100% Javascript
Installation
------------
`npm install rdb-parser`
Usage
-----
```javascript
var rdb = require('rdb-parser');
console.log(rdb.types);
var parser = new rdb.Parser();
parser.on('entity', function(e) {
console.log(e);
});
parser.on('error', function(err) {
throw err;
});
parser.on('end', function() {
console.log('done');
});
process.stdin.pipe(parser);
process.stdin.resume();
```
Status
------
`rdb-parser` aims for complete coverage of rdb dumps.
It is close to complete at this point supporting all entity types, but may be missing one or two of the variety of encoding variations that redis can use. And it has had limited testing.
Tests
-----
`npm test` parses a (rather small) .rdb file designed to exercise a variety of types and encodings.
How you can help
----------------
If you have a dump that `rdb-parser` cannot handle please report an issue and/or contribute the dump.
License
-------
(The MIT License)
Copyright (c) 2011-2012 Carlos Guerreiro, [perceptiveconstructs.com](http://perceptiveconstructs.com)
Copyright (c) 2012 Igalia S.L.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.