Commit Graph

10 Commits (0b925d075d359d03426f0b32bb58a5e05825b4ea)

Author SHA1 Message Date
Dmitry Baranovskiy 8ab3c3e7c3 Added ability to pass offset to buffer write and toString methods as a string, i.e. '2' and encoding as anything 2010-07-25 20:16:37 -07:00
Ryan Dahl 2c1ca4078d Implement buffer.write for base64
There might be an off-by-one on the returned value.
2010-07-23 16:36:52 -07:00
Ryan Dahl 528015e0d8 Implement buffer.toString('base64') 2010-07-23 13:52:44 -07:00
Peter Griess 56f200af5d Fix Buffer.toString() on 0-length slices.
- Buffer.toString('ascii', 0, 0) incorrectly returns the entire contents
  of the buffer. Fix this.
- Provide similar behavior to Buffer.write() and Buffer.copy() when
  dealing with 0-length in valid and invalid byte ranges.
2010-07-20 15:38:10 -07:00
Ryan Dahl 02729d4af7 instanceof Buffer to Buffer.isBuffer() 2010-07-15 15:58:35 -07:00
Blake Mizerany 898afbaf34 Buffer.prototype.write: Indifferent order preference of encoding and offset 2010-06-29 19:56:07 -07:00
Ryan Dahl 08a09bb50a Use some more Binary/F methods for Buffer 2010-04-08 16:31:02 -07:00
Ryan Dahl bb00fef3cd Change Buffer.toString to conform to CommonJS Binary/F
Also add Buffer.inspect
2010-03-26 08:36:08 -07:00
Ryan Dahl 6740dd48b3 Change Buffer toString() output 2010-03-25 09:50:49 -07:00
Ryan Dahl 025116f8d0 Move Buffer into own module 2010-03-19 20:58:24 -07:00