Johannes Weiss
62b4acaedf
ByteBuffer.clear: Prevent copying bytes if allocation is necessary
2018-01-05 15:01:48 +00:00
Norman Maurer
76482816e6
Prefix all ByteBuffer methods with get if these allow access to unitialized memory.
2017-12-15 12:24:09 +01:00
Cory Benfield
f3e72c13f3
Add HTTP streaming compressor
2017-12-15 09:50:12 +00:00
Cory Benfield
bcdef57481
Correctly track the writer index
2017-12-15 08:24:38 +00:00
Johannes Weiss
8a4a658bc7
fix large ByteBuffer allocations
2017-12-08 10:37:14 +00:00
Johannes Weiss
5eca60e46b
make ByteBuffer tests slightly more interesting
2017-12-01 17:39:23 +00:00
Johannes Weiß
a22fc02c51
ByteBuffer: fix a UInt underflow
2017-11-30 16:57:26 +00:00
Johannes Weiß
40edb34d8f
introduce & test ByteBuffer.readString
2017-11-08 13:06:09 -08:00
Johannes Weiss
c18db56fc2
make >= 0 checks for index/length a precondition
2017-11-09 02:49:11 -08:00
Max Moiseev
dccbbf0bb7
Remove unnecessary Numeric constraint
2017-11-08 14:46:10 -08:00
Johannes Weiß
20800ed454
use the now fully featured FixedWidthInteger instead of EndiannessInteger
2017-11-08 13:08:02 -08:00
Johannes Weiss
839a5050dd
ByteBuffer: fast path for contiguous collections
2017-11-03 02:39:54 -07:00
Johannes Weiss
e9c76088ac
ByteBuffer: avoid potential overflows for reading functions
2017-10-24 13:24:47 +01:00
Johannes Weiss
2889c7e3de
fix buffer confusion on incomplete writes
2017-10-17 16:51:15 +01:00
Johannes Weiss
3bef8a4012
turn import Foundation comments into code :)
2017-10-12 16:33:50 +01:00
Johannes Weiss
0b265368a1
use the new Swift 4 String APIs for encoding/decoding Strings
2017-10-10 17:12:02 +01:00
Johannes Weiss
1adb581f59
remove more Foundation imports
2017-10-10 16:25:43 +01:00
Johannes Weiss
de2cb8a038
ByteBuffer.set with Collection of UInt8
2017-09-29 15:41:32 +01:00
Norman Maurer
24ce812c31
Ensure swift-nio compiles on latest swift 4.0 snapshot
2017-08-08 13:25:57 +02:00
Johannes Weiß
0684750261
minor fixes
2017-08-08 15:48:56 +01:00
Norman Maurer
3c604f90dd
Move ByteBuffer.string(...) to ByteBuffer-aux
2017-07-10 15:50:24 +02:00
Norman Maurer
c12620e813
Directly use malloc/free when allocate ByteBuffer and also use realloc when change the size of the _Storage
2017-07-05 18:13:55 +02:00
Johannes Weiss
2fa81c9df4
make ByteBuffer allocation non-throwing (no reason it threw)
2017-06-29 15:38:02 +01:00
Johannes Weiß
cc9ecf2071
HTTP tests & fixes
2017-06-29 12:20:52 +01:00
Johannes Weiß
d85397d689
Endianness is spelt Endianness and not Endianess
...
see https://en.wikipedia.org/wiki/Endianness
2017-06-27 16:47:01 +01:00
Johannes Weiß
c1f2718786
fix undefined behaviour when loading integers (possibly misaligned)
2017-06-22 11:45:52 +01:00
Norman Maurer
1c5e0b4f9d
Fix error in ByteBuffer test
2017-06-21 20:35:24 +02:00
Norman Maurer
28c61c43e4
Remove ByteBuffer.skipBytes(...) as its reduntant with moveWriterIndex(forwardBy(...)
2017-06-16 20:26:53 +02:00
Norman Maurer
a7811b7b2d
Add ByteBuffer.write(buffer) and set(buffer)
2017-06-14 19:19:29 +02:00
Johannes Weiß
ba791a0ed5
new byte buffer
2017-06-12 17:42:07 +01:00
Kevin Clark
c9c3651f29
Minor cleanup in byte buffer
2017-06-08 12:05:26 -07:00
Kevin Clark
fc3e0fe384
ByteBuffer bounds checking fixes
...
This fixes a number of bounds checking issues, including changing the behavior of out of bounds access. Now if get is passed a negative value or a value beyond the size of the buffer, it explodes. If set is passed a negative value it also explodes, but values passed the end of the buffer continue to implicitly resize.
2017-06-08 11:51:41 -07:00
Johannes Weiß
02ff223eba
add faster (Static)String write path
2017-06-08 16:09:56 +01:00
Johannes Weiß
37cca97422
rename ByteBuffer.data to ByteBuffer.backingData (to refuse confusion)
2017-06-08 16:09:19 +01:00
Kevin Clark
b3a98126f7
Fix unit tests broken in merge
...
Rename clashed with new test.
2017-06-07 11:25:01 -07:00
Kevin Clark
329b474f45
Initial impl of EmbeddedChannel
2017-06-05 16:59:51 -07:00
Norman Maurer
e8d60df8c2
Make naming more consistent and so make it more swift-like api
2017-06-06 22:06:47 +02:00
Johannes Weiß
0fd639fc02
allow the usage of the Data slices API
2017-06-02 12:54:32 +01:00
Norman Maurer
488dcdcb5e
Add methods to ByteBufferAllocator that allows wrapping existing Data
2017-06-01 19:24:35 +02:00
Norman Maurer
b915af9987
Rename write(string) to writeString(...), make it faster and add setter as well
2017-06-01 16:23:46 +02:00
Kevin Clark
60c0ab1f6e
ByteBuffer unit tests
...
Greatly improves unit test coverage on ByteBuffer.
2017-05-31 09:09:48 -07:00
Norman Maurer
f788e03f5d
Implement ByteBuffer.discardReadBytes and add unit test
2017-05-27 08:47:16 +02:00
Kevin Clark
594bb0fb39
Fix ByteBuffer.write(string:)
2017-05-26 22:31:19 -07:00
Norman Maurer
b33ad4b572
Add data set/get/write/read methods to ByteBuffer
2017-05-22 19:33:38 +02:00
Norman Maurer
3b0f013a6e
Add slice(...) methods to ByteBuffer and fix a few bugs
2017-05-22 17:17:54 +02:00
Norman Maurer
9286f4e221
Add methods to get / read / set / write Integer types to ByteBuffer
2017-05-22 13:57:49 +02:00