Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating Encoder and Decoder for browsers #34

Closed
kawanet opened this issue Apr 22, 2016 · 1 comment
Closed

Separating Encoder and Decoder for browsers #34

kawanet opened this issue Apr 22, 2016 · 1 comment

Comments

@kawanet
Copy link
Owner

kawanet commented Apr 22, 2016

The module has both interfaces of encoder and decoder. It might be better to have a one side interface than two for some cases such as a web client which sends msgpack but does not receive.

var decode = require('msgpack').decode; // this load full (both) interfaces per default
var decode = require('msgpack-lite/lib/decode').decode; // this should load less dependencies than above
var encode = require('msgpack-lite/lib/encode').encode; // ditto

See #33

@kawanet
Copy link
Owner Author

kawanet commented Jun 11, 2016

Separated.

decode.js depends on decode-* and read-* files.

$ browserify --list msgpack-lite/lib/decode.js | sort
msgpack-lite/lib/buffer-lite.js
msgpack-lite/lib/codec-base.js
msgpack-lite/lib/decode-buffer.js
msgpack-lite/lib/decode.js
msgpack-lite/lib/ext-buffer.js
msgpack-lite/lib/ext-unpacker.js
msgpack-lite/lib/flex-buffer.js
msgpack-lite/lib/read-core.js
msgpack-lite/lib/read-format.js
msgpack-lite/lib/read-token.js
msgpack-lite/node_modules/browserify/node_modules/buffer/index.js
msgpack-lite/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js
msgpack-lite/node_modules/ieee754/index.js
msgpack-lite/node_modules/int64-buffer/int64-buffer.js
msgpack-lite/node_modules/isarray/index.js

encode.js depends on encode-* and write-* files.

$ browserify --list msgpack-lite/lib/encode.js | sort
msgpack-lite/lib/buffer-lite.js
msgpack-lite/lib/codec-base.js
msgpack-lite/lib/encode-buffer.js
msgpack-lite/lib/encode.js
msgpack-lite/lib/ext-buffer.js
msgpack-lite/lib/ext-packer.js
msgpack-lite/lib/flex-buffer.js
msgpack-lite/lib/write-core.js
msgpack-lite/lib/write-token.js
msgpack-lite/lib/write-type.js
msgpack-lite/lib/write-uint8.js
msgpack-lite/node_modules/browserify/node_modules/buffer/index.js
msgpack-lite/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js
msgpack-lite/node_modules/ieee754/index.js
msgpack-lite/node_modules/int64-buffer/int64-buffer.js
msgpack-lite/node_modules/isarray/index.js

@kawanet kawanet closed this as completed Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant