1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-11-30 04:19:23 +01:00
Commit Graph

127 Commits

Author SHA1 Message Date
Niklas Keller
2df6b8cde3 Remove unused import 2017-05-17 09:39:32 +02:00
Niklas Keller
0bba99c49c Add missing foobar.txt.gz 2017-05-17 09:37:15 +02:00
Niklas Keller
34a571cd85 Add basic zlib input stream test 2017-05-17 08:17:15 +02:00
Niklas Keller
9e90d1fa09 Add tests, fix ResourceOutputStream writable check 2017-05-16 23:27:48 +02:00
Niklas Keller
ad249a8fc8 Merge pull request #9 from amphp/message-input-stream
Make Message accept an InputStream instead of an Iterator
2017-05-15 19:39:50 +02:00
Niklas Keller
71745c6105 Make Message accept an InputStream instead of an Iterator
The purpose of Message is to allow streaming and buffering of an
InputStream with a simple API. Before this commit, Message served a
second purpose: Converting an Amp\Iterator to an InputStream. This has
been separated to allow ZlibInputStream and other InputStreams to be
used as Message. Converting an Amp\Iterator to an InputStream is now
possible using the new IteratorStream class.
2017-05-14 16:40:42 +02:00
Niklas Keller
4f4c9f171c Fix code style 2017-05-14 14:41:04 +02:00
Niklas Keller
c397a22ac9 Rename Gzip*Stream to Zlib*Stream and allow different encodings 2017-05-14 14:40:32 +02:00
Aaron Piotrowski
ca3ab2dc73 Restore destructor on resource stream
Forgot close() needed to be called to free watcher.
2017-05-12 10:27:58 -05:00
Aaron Piotrowski
a37ebef071 Add simple parser example 2017-05-12 09:32:41 -05:00
Aaron Piotrowski
f63b1ec35c Revert "Update benchmark example"
This reverts commit fbf4b2ef64.
2017-05-12 09:21:39 -05:00
Aaron Piotrowski
e7f7326363 PendingReadException → PendingReadError
Consecutive reads is a coding error, so it should be an instance of Error.
2017-05-12 00:06:07 -05:00
Aaron Piotrowski
f6e765cea3 Succeed reads with null on closed stream 2017-05-11 23:56:36 -05:00
Aaron Piotrowski
c2eac67b79 Fix close() and make public again 2017-05-11 23:52:15 -05:00
Aaron Piotrowski
fbf4b2ef64 Update benchmark example 2017-05-11 18:14:33 -05:00
Aaron Piotrowski
cfbf25e3b5 Remove close() from interfaces 2017-05-11 18:08:45 -05:00
Bob Weinand
98bbffb48f Fix Message::read() when end is reached before call to read() 2017-05-11 16:33:00 +02:00
Aaron Piotrowski
11a92648d1 Revert IteratorStream name to Message 2017-05-10 18:20:34 -05:00
Aaron Piotrowski
abb7c9c6b5 Use back-pressure 2017-05-10 18:04:10 -05:00
Niklas Keller
a66fef9b55 Add InMemoryStream 2017-05-08 11:15:10 +02:00
Niklas Keller
59b2454253 Fix null pointer access in GzipInputStream 2017-05-08 09:44:54 +02:00
Niklas Keller
56ec64c508 Fix null pointer access in GzipOutputStream::close 2017-05-08 09:30:19 +02:00
Niklas Keller
f89c6a1161 Implement GzipOutputStream, closes #5 2017-05-08 08:51:52 +02:00
Niklas Keller
adc2de34c0 Ignore platform requirements for php-cs-fixer 2017-05-07 22:23:08 +02:00
Niklas Keller
3a51a03d0f Fix code style 2017-05-07 22:19:55 +02:00
Niklas Keller
391d2fa802 Update LICENSE year 2017-05-07 22:18:55 +02:00
Niklas Keller
55a7118da9 Add .editorconfig and fix code style 2017-05-07 22:14:45 +02:00
Aaron Piotrowski
6241988750 Restore Message as IteratorStream 2017-05-07 22:10:16 +02:00
Aaron Piotrowski
162ca40807 Merge pull request #3 from amphp/kelunik-api-proposal
Major API change + merged Reader and Writer from amphp/socket
2017-05-07 09:52:28 -05:00
Niklas Keller
23f5ba91b9 Simplify GzipInputStream by removing the state tracking 2017-05-07 11:14:41 +02:00
Niklas Keller
bc24326ec0 Add GzipInputStream 2017-05-05 22:39:39 +02:00
Niklas Keller
bcefe903c9 Add ReactPHP credit 2017-05-05 21:38:43 +02:00
Niklas Keller
85cd222d2f Add simple benchmark 2017-05-05 16:52:06 +02:00
Niklas Keller
9714de66ae Remove buffered stream implementations 2017-05-05 16:47:45 +02:00
Niklas Keller
73e6441fd9 Add getResource() to resource streams 2017-05-05 16:45:53 +02:00
Niklas Keller
622f98c966 Improve readability, written is never larger than length 2017-05-05 15:42:18 +02:00
Aaron Piotrowski
4b7a537d7b Refactor ResourceInputStream for new API 2017-05-04 16:30:40 -05:00
Aaron Piotrowski
523ce79dab Update composer.json 2017-05-04 16:30:24 -05:00
Aaron Piotrowski
f3536494e9 Fix conflicts in Parser 2017-05-04 16:30:13 -05:00
Niklas Keller
bf90335bb6 Major API change + merged Reader and Writer from amphp/socket 2017-04-30 08:33:16 +02:00
Aaron Piotrowski
6d9d3bd8d2 Drop dispose method from Parser
Nulling the generator reference is enough. dispose() was not able to guarantee catching from finally. Just don't throw from finally in a parser generator.
2017-04-27 18:30:27 -05:00
Niklas Keller
16fc80ae3b Update and fix php-cs-fixer and code style 2017-04-26 08:27:52 +02:00
Niklas Keller
9f22953566 Fix typo 2017-04-26 08:21:18 +02:00
Niklas Keller
5ed3a00d33 Fix minor coding issues and typos 2017-04-26 08:17:19 +02:00
Niklas Keller
0eedcf4c65 Rename repository to byte-stream 2017-04-24 21:18:08 +02:00
Aaron Piotrowski
c331b2138a Add Parser 2017-04-15 09:44:22 -05:00
Aaron Piotrowski
b1c3b9ce96 Update docblock notes 2017-04-14 18:08:31 -05:00
Aaron Piotrowski
5d7d0c97d2 Listener → StreamIterator 2017-04-14 18:06:18 -05:00
Aaron Piotrowski
8d59f8a8b9 Manually count bytes written in pipe()
write() may not resolve with the number of bytes written
2017-04-14 17:52:57 -05:00
Aaron Piotrowski
1d7c9f0d5d Remove MemoryStream 2017-04-14 17:52:28 -05:00