Commit graph

36 commits

Author SHA1 Message Date
Oliver Schulz
75c04d8944 Explicit types for everything related to ByteString and ByteStringIterator 2012-05-26 12:08:44 +02:00
Oliver Schulz
5d08cd0b92 Removed ContByteString
A proper implementation of ContByteString with specialized return
types for methods like take, drop, etc. would have made things more
complex than it is worth.
2012-05-26 11:40:23 +02:00
Oliver Schulz
d3177bf08f Improved return type specialization for methods implemented in super-type 2012-05-26 11:30:51 +02:00
Oliver Schulz
0c76e0f0f6 Moved ByteIterator implementations into object ByteIterator 2012-05-26 11:30:23 +02:00
Oliver Schulz
7d3edcddbc Improved implementation of ByteStrings.iterator 2012-05-18 17:36:16 +02:00
Oliver Schulz
bc0693a2de Added variants of putBytes, putShorts, etc. to ByteStringBuilder
Also removed byteOrder defaults for all put... methods.
2012-05-18 01:09:01 +02:00
Oliver Schulz
266c67679a Added methods isCompact and isContiguous to ByteString
* The ability to check whether a ByteString is compact / contiguous
  can be very useful when optimizing user code
2012-05-18 01:09:01 +02:00
Oliver Schulz
5d7823fd49 Made byteOrder implicit in ByteStringBuilder methods 2012-05-18 01:09:01 +02:00
Oliver Schulz
15507dff85 Added methods putByte, putShort, etc. to ByteStringBuilder 2012-05-18 01:09:01 +02:00
Oliver Schulz
f127b50ca2 Added methods putBytes, putShorts, etc. to ByteStringBuilder 2012-05-18 01:09:01 +02:00
Oliver Schulz
53a01ecc12 Added a java.io.OutputStream wrapper to ByteStringBuilder 2012-05-18 01:09:01 +02:00
Oliver Schulz
3263f43060 Added a companion object, length and sizeHint to class ByteStreamBuilder 2012-05-18 01:09:01 +02:00
Oliver Schulz
018f1c92d5 Improved implementations of ByteString.++ 2012-05-18 01:09:00 +02:00
Oliver Schulz
c8d7c995db Enhanced ByteString implementation using ByteIterator 2012-05-18 01:09:00 +02:00
Oliver Schulz
76dab6354e Added ByteIterator 2012-05-18 01:09:00 +02:00
Oliver Schulz
3436c3b14d Added ByteString1.apply(bytes, startIndex, length) 2012-05-18 01:09:00 +02:00
Oliver Schulz
322edb2eca Introduced ContByteString to complement CompactByteString
Many operations are necessarily more efficient on contiguous data
(represented by a contiguous part of an array) than on chunked data
(e.g. wrapping in a ByteBuffer, etc.).

It should be possibly to check whether a ByteString fulfills this
requirement and to specifically request such a ByteString for specific
applications. The new abstract ContByteString, as a natural bridge
between CompactByteString and ByteString, provides this.
2012-05-18 01:09:00 +02:00
Oliver Schulz
9076fbf268 Optimized ByteString1.++ 2012-05-18 01:09:00 +02:00
Oliver Schulz
a8030b0bf0 Optimized CompactByteString.apply methods for the case of empty input 2012-04-24 23:38:48 +02:00
Oliver Schulz
68d073203c Renamed ByteString.ByteStringCompact to ByteString.ByteString1C
Avoids confusing ByteStringCompact with CompactByteString and fits in
well with siblings ByteString1 and ByteStrings.

Also improved class description.
2012-04-24 23:16:05 +02:00
Oliver Schulz
ecef10eabc Added CompactByteString
* CompactByteString provides an instance of ByteString that is
  guaranteed to be compact and has performance-optimized element
  acces (since no range-checking is necessary)

* sealed abstract class ByteString, since the implementations of
  ByteString1 and ByteStings assume a fixed set of ByteString
  classes (in pattern matching).
2012-04-23 20:11:16 +02:00
Oliver Schulz
1453170c96 Fixed ByteStringBuilder.resizeTemp
resizeTemp didn't update _tempCapacity, causing ByteStringBuilder to
create a new _temp array on each call of +=.
2012-04-20 14:10:10 +02:00
Jonas Bonér
4923d9a1a8 Added copyright header.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:51:38 +01:00
Viktor Klang
9de08bb4ce Review comments addressed 2012-01-25 16:23:06 +01:00
Viktor Klang
f7a45c0e8f Removing dead imports from akka-actor 2012-01-25 15:38:04 +01:00
Derek Williams
d5616e123b Scaladoc for ByteString 2012-01-20 13:38:22 -07:00
Derek Williams
a1f9b81ce9 Update IO to new iteratee based api 2011-12-31 09:18:37 -07:00
Derek Williams
9c30aea161 Combine ByteString and ByteRope 2011-06-05 14:04:18 -06:00
Derek Williams
8b166454bf Add test of basic Redis-style key-value store 2011-05-27 22:52:06 -06:00
Derek Williams
4cc901c708 Add ByteRope for concatenating ByteStrings without copying 2011-05-27 18:53:18 -06:00
Derek Williams
e165d35273 remove unused val 2011-05-26 19:28:45 -06:00
Derek Williams
45cfbec489 Add ByteString.concat to companion object 2011-05-24 11:28:57 -06:00
Derek Williams
e4a68cde93 ByteString will retain it's backing array when possible 2011-05-24 10:55:38 -06:00
Derek Williams
e547ca0de8 ByteString improvements 2011-05-22 15:16:38 -06:00
Derek Williams
05e93e3f18 ByteString.apply optimized for Byte 2011-05-22 13:53:58 -06:00
Derek Williams
9ef8ea5ff5 Basic immutable ByteString implmentation, probably needs some methods overriden for efficiency 2011-05-22 11:00:51 -06:00