Commit graph

84 commits

Author SHA1 Message Date
Zahary Karadjov
bf930b6f1b
Implement readInto and read(n) 2020-05-03 04:35:34 +03:00
Zahary Karadjov
b24300bd3f
Address review comments; Add documentation; Shared buffering mechanism for input and output streams 2020-05-01 19:12:58 +03:00
Zahary Karadjov
caab5c917f
Don't use destructors 2020-04-22 21:26:31 +03:00
Zahary Karadjov
f3d1c8883f
Address some review comments; Apply the same destructor fix to the output stream 2020-04-17 00:22:35 +03:00
Zahary Karadjov
6ce0472ec0
Prevent a mysterious crash in NBC 2020-04-15 00:10:56 +03:00
Zahary Karadjov
2c87f53c03
Fix fileInputs.readable(n) 2020-04-14 16:58:51 +03:00
Zahary Karadjov
69fc4e24ee
Initial work on pipelines 2020-04-14 16:34:39 +03:00
Zahary Karadjov
4b147d64a0
Allow constructing derived stream types with custom pageSize 2020-04-11 23:35:49 +03:00
Zahary Karadjov
1f49f1179d
Add destructors 2020-04-11 23:31:08 +03:00
Zahary Karadjov
b234a99e56
Fix a bug affecting Snappy (crash when using fileInputs) 2020-04-10 17:37:51 +03:00
Zahary Karadjov
26a5d82150
Work around a Nim bug 2020-04-10 16:43:12 +03:00
Zahary Karadjov
3efad6f7f2
Harmonize the APIs and the coding practices in input_stream and output_stream 2020-04-10 15:30:58 +03:00
Zahary Karadjov
fa415774c3
Add vtableAddr as a reusable helper for working around a Nim issue 2020-04-09 22:56:15 +03:00
Zahary Karadjov
49eb9a10d3
[OutputStream] Simpler API for stream implementers 2020-04-09 22:41:19 +03:00
Zahary Karadjov
62136f8e79
[OutputStream] Clean up TODO items unlocked by Nim 1.2; Simplify the public API 2020-04-09 22:21:20 +03:00
Zahary Karadjov
5fb40e4ffd
Remove deprecation warnings 2020-02-22 01:12:48 +02:00
andri lim
e7a34b74f2 fixes output stream casting problem 2019-09-03 11:57:57 +03:00
andri lim
12250ec3ed fixes zero length input bug in output_stream.append 2019-09-03 11:57:57 +03:00
Zahary Karadjov
6bbe1c21b6
Cosmetic renames and a simple helper for writing to arrays 2019-08-07 05:18:56 +03:00
Zahary Karadjov
9c5c6bdd6f
Fix a build issue affecting Nim 0.20.2 2019-08-01 19:26:22 +03:00
Zahary Karadjov
6250518b6f
Stronger guarantees for write block sizes
Certain output streams such as compressors and ciphers may require
a certain block size on each write.
2019-07-31 01:50:05 +03:00
Zahary Karadjov
2bc3941e76
Support for arbitrarily large fixed delayed writes 2019-07-26 23:52:16 +03:00
Zahary Karadjov
26e4f63c57
Fix a strange build issue, manifesting only in certain contexts 2019-07-10 20:17:05 +03:00
Zahary Karadjov
c8a7409c96
Add InputStream.endPos 2019-07-08 17:12:50 +03:00
Zahary Karadjov
b6b95b1da3
More sophisticated append proc taking various short-cuts when possible 2019-07-07 15:03:57 +03:00
Zahary Karadjov
faf75d4326
Simplify the inner workings of output streams and build out more of the public API 2019-07-07 15:03:57 +03:00
Zahary Karadjov
f1c376cd91
Writer cursors that precisely track to which page they belong 2019-07-07 15:03:56 +03:00
Jacek Sieka
5135173f60
std_shims -> stew 2019-07-07 11:44:59 +02:00
Zahary Karadjov
1d693484f6 Added a helper proc: DelayedWriteCursor.totalBytesWrittenAfterCursor
Delayed writes a typically used to implement length-prefixed messages
and this procs makes it very easy to handle this use case.
2019-06-16 18:49:49 +03:00
Zahary Karadjov
7dd9a92ccb Work-around a Nim compilation issue 2019-03-25 01:22:44 +02:00
Ștefan Talpalaru
acd5a6063c
assert() -> doAssert()
Also fixed a test and added the other to the Nimble task.
2019-03-14 04:19:41 +01:00
Zahary Karadjov
7903f1680f More comprehensive OutputStream; Basic support for stream cursors 2019-03-11 11:36:32 +02:00
Zahary Karadjov
aaff7fac31 Add a useful debug helper 2018-12-19 12:30:00 +02:00
Zahary Karadjov
cb54254b77 Initial version (extracted from nim-serialization) 2018-12-17 23:49:42 +02:00