protodef
Version:
A simple yet powerful way to define binary protocols
48 lines (35 loc) • 3.07 kB
Markdown
# ProtoDef
[](http://npmjs.com/package/protodef)
[](https://discord.gg/GsEFRM8)
[](https://gitter.im/PrismarineJS/general)
[](https://irc.gitter.im/)
[](https://github.com/ProtoDef-io/node-protodef/actions?query=workflow%3A%22CI%22)
[](https://tonicdev.com/npm/protodef)
[](https://gitpod.io/#https://github.com/ProtoDef-io/node-protodef)
This is a node.js module to simplify defining, reading and writing binary blobs,
whether they be internet protocols or files.
## Installing
```
npm install ProtoDef
```
## Usage
See [example](example.js)
## Documentation
See the language independent [ProtoDef](https://github.com/ProtoDef-io/ProtoDef) specification.
* [api.md](doc/api.md) documents the exposed functions and classes
* [compiler.md](doc/compiler.md) documents the ProtoDef Compiler
* [datatypes.md](https://github.com/ProtoDef-io/ProtoDef/blob/master/doc/datatypes.md) documents the default datatypes provided by Protodef.
* [newDatatypes.md](doc/newDatatypes.md) explains how to create new datatypes for protodef
* [history.md](doc/history.md) is the releases history
## Projects Using ProtoDef
* [minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol) defines a protocol.json by minecraft version and use ProtoDef to serialize and parse packets
* the protocol.json files are stored in [minecraft-data](https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.8/protocol.json)
* and they can be visualized automatically in this [doc](http://prismarinejs.github.io/minecraft-data/?d=protocol)
* [prismarine-nbt](https://github.com/PrismarineJS/prismarine-nbt) defined a nbt.json to parse and serialize the NBT format
* [mineflayer](https://github.com/PrismarineJS/mineflayer/blob/master/lib/plugins/command_block.js) uses ProtoDef to parse plugin messages
* [minecraft-protocol-forge](https://github.com/PrismarineJS/node-minecraft-protocol-forge) parses and serialize forge plugin messages
* [node-raknet](https://github.com/mhsjlw/node-raknet) describe the raknet protocol in a protocol.json and uses ProtoDef to read it
* [minecraft-classic-protocol](https://github.com/mhsjlw/minecraft-classic-protocol) defines the classic minecraft protocol with ProtoDef
* [pocket-minecraft-protocol](https://github.com/mhsjlw/pocket-minecraft-protocol) defines the minecraft pocket edition protocol
* [diablo2-protocol](https://github.com/MephisTools/diablo2-protocol) Diablo 2 network protocol
* [dofus-protocol](https://github.com/AstrubTools/dofus-protocol) Network protocol for dofus : create client and servers for dofus 1.30