0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

96 Commits

Author SHA1 Message Date
koichik
fcc04e67c8 Fix SlowBuffer.write() with 'ucs2' throws ReferenceError. 2011-04-28 04:57:00 -04:00
Ryan Dahl
bfa9db9dd6 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
	test/simple/test-buffer.js
2011-04-03 23:42:56 -07:00
Ryan Dahl
038306a6c3 Closes GH-843. Fix SlowBuffer.prototype.slice 2011-03-29 10:47:14 -07:00
Ryan Dahl
6111c17a0e correct hexSlice end 2011-03-15 11:42:23 -07:00
isaacs
3c9fb3ec1a Fix invalid end handling for SlowBuffer#hexSlice 2011-03-15 11:39:11 -07:00
Ryan Dahl
ab190d38b7 Fix buffer.toString('hex') 2011-03-14 18:24:28 -07:00
Ryan Dahl
247d880113 Merge branch 'v0.4'
Conflicts:
	src/node_version.h
2011-03-14 17:45:15 -07:00
Ryan Dahl
55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
isaacs
0aa1a8a005 Closes GH-695 Add 'hex' encoding to Buffer 2011-02-19 19:24:23 -08:00
isaacs
2e6a263e29 Closes GH-609 Support array-ish args to Buffer ctor
Any array-ish thing (whether a Buffer, an Array, or just an object with
a numeric "length") is interpreted as a list of bytes.
2011-02-07 14:13:18 -08:00
Konstantin Käfer
9e101f2b01 UCS-2 support
Closes GH-644.
2011-02-07 13:35:06 -08:00
Ryan Dahl
97e13748fa Typos
Closes GH-557.
Closes GH-539.
2011-01-27 14:28:47 -08:00
Ryan Dahl
db78043d52 lint 2010-12-01 16:42:31 -08:00
Ryan Dahl
aed0ba3211 buffer.copy targetStart defaults to 0 2010-11-29 19:59:01 -08:00
Ryan Dahl
6d7242b485 Document defaults for buffer.copy() 2010-11-29 19:52:47 -08:00
Ryan Dahl
4f32a59307 Fix buffer.slice(0, 0) 2010-11-23 12:20:22 -08:00
Stéphan Kochen
57eb5cb9a0 Make SlowBuffer pass Buffer.isBuffer test. 2010-11-18 15:36:09 -08:00
Ryan Dahl
515f006b6e Add legacy methods to Buffer 2010-11-02 10:09:59 -07:00
Ryan Dahl
cf1db4f304 base64 decode should handle whitespace 2010-10-18 11:34:35 -07:00
Ryan Dahl
77fc61d539 Default value for second arg of Buffer#slice 2010-09-14 15:39:27 -07:00
Ryan Dahl
b8bfbdab48 Rename SlowBuffer in binding 2010-09-09 11:03:51 -07:00
Ryan Dahl
5bc4efe820 Remove blobs, simplify SlowBuffer
Implement SlowBuffer.prototype.slice in js
2010-09-09 11:03:51 -07:00
Ryan Dahl
ba2e4a2306 Simplify fast buffer constructor 2010-09-09 11:03:50 -07:00
Ryan Dahl
3e9f636b64 Improve long buffer test 2010-09-09 11:03:50 -07:00
Ryan Dahl
17ba821e60 defineProperty is slow, don't use it for fastbuffer 2010-09-09 11:03:50 -07:00
Ryan Dahl
d3fcd1c75a Expose SlowBuffer 2010-09-09 11:03:50 -07:00
Ryan Dahl
8b4f1e05f9 Expose Buffer.poolSize 2010-09-09 11:03:50 -07:00
Ryan Dahl
5506f99dfa map charsWritten to fast buffer 2010-09-09 11:03:49 -07:00
Ryan Dahl
7b772f3f68 More fast buffer work 2010-09-09 11:03:48 -07:00
Ryan Dahl
d5bdda74c1 fast buffer bounds checking in copy() 2010-09-09 11:03:48 -07:00
Tim-Smart
6ea99721f1 string.length !== Buffer.byteLength(string) 2010-09-09 11:03:48 -07:00
Ryan Dahl
2dda6be799 Fast Buffer safe constructor 2010-09-09 11:03:48 -07:00
Ryan Dahl
b87669cbf4 Fix fastbuffer style
Fix style
2010-09-09 11:03:48 -07:00
Tim-Smart
2b07c9fcae Some silly fixes to buffer.js 2010-09-09 11:03:47 -07:00
Tim-Smart
746d487da8 FastBuffer implementation. API needs migration 2010-09-09 11:03:47 -07:00
Ryan Dahl
51ecba8da9 Add get/set methods to Buffer 2010-08-19 23:29:06 -07:00
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