mercredi 27 août 2014

Node.js buffer + lz4 issues - buffer.js:705 throw TypeError('value is out of bounds')


Vote count:

0




I have a line in my code that is generating an error but I can't figure out what is causing it.



var compressedOutput = lz4.encode(new Buffer(logdata,"utf8"));


The variable 'logdata' contains a string I generate with log data. Is this an issue with lz4 or the way I'm creating my buffer? How can I resolve?



buffer.js:705
throw TypeError('value is out of bounds');
^
TypeError: value is out of bounds
at TypeError (<anonymous>)
at checkInt (buffer.js:705:11)
at Buffer.writeInt32LE (buffer.js:782:5)
at Encoder._flush (/var/www/node_modules/lz4/lib/encoder_stream.js:210:7)
at Encoder.<anonymous> (_stream_transform.js:130:12)
at Encoder.g (events.js:180:16)
at Encoder.emit (events.js:92:17)
at finishMaybe (_stream_writable.js:359:12)
at endWritable (_stream_writable.js:366:3)
at Encoder.Writable.end (_stream_writable.js:344:5)
worker 3884 died


asked 1 min ago

VinnyD

1,291






Node.js buffer + lz4 issues - buffer.js:705 throw TypeError('value is out of bounds')

Aucun commentaire:

Enregistrer un commentaire