Commit Graph

58 Commits

Author SHA1 Message Date
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
380d12832c Remove dead code 2010-09-09 11:03:50 -07:00
Ryan Dahl
efc723787a Fix big string bug 2010-09-09 11:03:50 -07:00
Ryan Dahl
71d67dbf48 Remove fancy SlowBuffer constructor 2010-09-09 11:03:50 -07:00
Ryan Dahl
6135941eea Fix ByteLength hangup 2010-09-09 11:03:50 -07:00
Ryan Dahl
ececd92f62 Fix base64 write for buffers 2010-09-09 11:03:49 -07:00
Ryan Dahl
1f947f7b41 remove unnecessary casts 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
Ryan Dahl
1cf538a60a Work to get C++ fast buffers. incomplete 2010-09-09 11:03:48 -07:00
Ryan Dahl
565d862f3c Fix buffer binding 2010-09-09 11:03:48 -07:00
Tim-Smart
746d487da8 FastBuffer implementation. API needs migration 2010-09-09 11:03:47 -07:00
Ryan Dahl
f86ad1693f Safe Constructor: Buffer 2010-08-27 15:23:51 -07:00
Ryan Dahl
488aff085b Improve appendix markdown 2010-08-21 01:24:14 -07:00
Ryan Dahl
7db5c8a10d Fix toString('base64') bug
Thanks to Stepan Stolyarov for the test case.
2010-08-04 11:38:48 -07:00
Ryan Dahl
c38dd24dc5 Fix style 2010-07-30 10:54:43 -07:00
Ben Noordhuis
f72ac17c89 Buffer: graciously handle padding in base64-encoded input. 2010-07-30 10:49:00 -07:00
Ryan Dahl
f291fbc8a7 Fix ending \0 in base64 decoding 2010-07-29 14:52:40 -07:00
Ben Noordhuis
95638c9b0d Buffer: adjust buffer size so the base64-decoded input fits snugly.
Stops Valgrind from complaining about uninitialized memory access.
2010-07-28 11:37:23 -07:00
Benjamin Kramer
eeaf1ef970 Constify read-only global data
Also silences a compiler warning about deprecated conversion from const
char* to char*.
2010-07-26 22:14:39 +02: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
e7c4f8cdaa Buffer.copy() should liberally allow empty copies. 2010-07-15 10:20:42 -07:00
Peter Griess
b64a521d66 Buffer('') should create a 0-length buffer 2010-07-15 09:54:53 -07:00
Paul Querna
82daa46e26 Move Buffer to extension model. 2010-07-14 10:37:24 -07:00
Blake Mizerany
8c8534046c fix whitespace errors 2010-06-29 23:59:24 -07:00
Matt Ranney
02ed0ec93b On overlapping buffers use memmove 2010-06-29 21:06:00 -07:00
Ryan Dahl
5e86d01385 Revert "Buffer.copy should copy through sourceEnd, as specified."
This reverts commit a2f70da4c9.

Keep tests modifies a few edge checks on Copy()
2010-06-29 19:40:20 -07:00
Matt Ranney
a2f70da4c9 Buffer.copy should copy through sourceEnd, as specified.
Improve test-buffer.js to cover all copy error cases.

Fix off by one error in string_decoder.
2010-06-25 09:10:49 -07:00
Ryan Dahl
3768aaaea4 Create a public Buffer constructor for use in addons. 2010-05-24 13:26:18 -07:00
Felix Geisendörfer
0a539865dd Support arrays and strings in buffer constructor
This is be very useful for testing code that deals with buffers.
2010-05-17 11:19:14 -07:00
Ryan Dahl
8e5b91c79b Revert "Check for strings.h"
This reverts commit 032f651824.
2010-05-10 16:38:14 -07:00
Ryan Dahl
032f651824 Check for strings.h 2010-05-10 16:30:31 -07:00
kriskowal
8d1f1186ca Fixed/Completed buffer copy range checks. 2010-04-30 17:36:21 -07:00
Ryan Dahl
5281f29012 Use new method of getting chars written for UTF8 2010-04-15 02:09:51 -07:00
Ryan Dahl
41ef1717e0 Upgrade V8 to 2.2.3.1 2010-04-14 10:34:27 -07:00
Ryan Dahl
b8c0349750 Fix triple buffer slice bug 2010-04-14 00:36:34 -07:00
Ryan Dahl
38041fcaa0 Try out Flatten API
Speeds up WriteUtf8 significantly when dealing with strings made by the
concatenation of many others.
2010-04-06 16:15:09 -07:00
Ryan Dahl
53dd9fe200 Fix bug in buffer.utf8Write() which included \u0000 2010-04-05 18:10:36 -07:00
Ryan Dahl
85487c82d0 Blob struct should not contain actual data
This is to allow eventual realloc without messing up the data_ references in
all the slices.
2010-04-04 21:37:08 -07:00
Ryan Dahl
b72ffc0e07 Add buffer.copy 2010-04-04 18:59:40 -07:00
Ryan Dahl
ac684f3583 Add legacy 'binary' encoding/decoding methods to Buffer 2010-03-19 20:33:09 -07:00
Ryan Dahl
3a993d8897 Buffer.utf8ByteLength -> Buffer.byteLength 2010-03-19 12:02:59 -07:00
Ryan Dahl
0c64768cb4 Don't error out when buffer.utf8Write() doesn't fit 2010-03-19 11:46:09 -07:00
Ryan Dahl
177de8fefc Fix some gcc warnings 2010-03-12 12:21:27 -08:00
Ryan Dahl
3d10852c33 Disable AsciiSliceExt
Seems faster and less buggy?
2010-03-12 12:21:27 -08:00
Ryan Dahl
c1a0ade7e7 Further net2 compatibilities 2010-03-09 16:27:49 -08:00
Ryan Dahl
1660db6b87 Inline Buffer::HasInstance 2010-02-02 19:35:06 -08:00
Ryan Dahl
4f56d8ae24 Rename Buffer.utf8Length to Buffer.utf8ByteLength 2010-02-01 13:10:37 -08:00