Better node compatibility : Use readable-stream

This commit is contained in:
roblabla 2015-05-22 19:00:01 +00:00
parent ced091b2b2
commit 6e6b51ca10
4 changed files with 4 additions and 3 deletions

View file

@ -44,6 +44,7 @@
"buffer-equal": "0.0.0",
"node-uuid": "~1.4.1",
"prismarine-nbt": "0.0.1",
"readable-stream": "^1.1.0",
"superagent": "~0.10.0",
"ursa-purejs": "0.0.3"
},

View file

@ -1,6 +1,6 @@
var [readVarInt, writeVarInt, sizeOfVarInt] = require("../datatypes/utils").varint;
var zlib = require("zlib");
var Transform = require("stream").Transform;
var Transform = require("readable-stream").Transform;
module.exports.createCompressor = function(threshold) {
return new Compressor(threshold);

View file

@ -1,5 +1,5 @@
var [readVarInt, writeVarInt, sizeOfVarInt] = require("../datatypes/utils").varint;
var Transform = require("stream").Transform;
var Transform = require("readable-stream").Transform;
module.exports.createSplitter = function() {
return new Splitter();

View file

@ -1,6 +1,6 @@
var [readVarInt, writeVarInt, sizeOfVarInt] = require("../datatypes/utils").varint;
var protocol = require("../protocol");
var Transform = require("stream").Transform;
var Transform = require("readable-stream").Transform;
module.exports.createSerializer = function(obj) {
return new Serializer(obj);