Commit Graph

33 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 5ae9bb8925 Fail fast if huffman decoding context is in failure state 2019-11-09 17:18:11 +09:00
Tatsuhiro Tsujikawa 5d6964cf81 Faster huffman decoding 2019-10-12 14:30:31 +09:00
Tatsuhiro Tsujikawa 0d855bfc1b Faster huffman encoding 2019-10-12 14:30:31 +09:00
Tatsuhiro Tsujikawa 0e1d0400d8 Use whole chunk when performing huffman encoding 2016-08-17 21:05:04 +09:00
Tatsuhiro Tsujikawa 8da20975f9 Always allocate buffer for name, and value 2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa ba08948307 Merge branch 'master' of https://github.com/alagoutte/nghttp2 into alagoutte-master 2015-10-04 22:02:47 +09:00
Alexis La Goutte 81addc77b4 Add (and fix) -Wredundant-decls 2015-10-04 14:48:32 +02:00
Tatsuhiro Tsujikawa d804780c25 Fix compile error with Android NDK and --enable-werror 2015-09-25 01:45:28 +09:00
Tatsuhiro Tsujikawa 170f2a144a Fix warning with gcc 2015-09-23 18:26:02 +09:00
Tatsuhiro Tsujikawa 28fe3e7e89 More warning flags for --enable-werror 2015-09-23 16:49:45 +09:00
Tatsuhiro Tsujikawa c8f67788e0 Remove unused local variable 2015-04-26 19:47:14 +09:00
Tatsuhiro Tsujikawa bbdff112a3 Make huffman decoding slightly faster using evil looking macro 2015-04-26 19:39:33 +09:00
Alexis La Goutte c87631c2e6 Fix other shorten-64-to-32 casting error found by MSVC (64bits)
Thanks to Pascal
2015-01-10 15:17:31 +01:00
Tatsuhiro Tsujikawa e8513b3241 Make huffman encoding faster 2014-12-19 23:22:55 +09:00
Tatsuhiro Tsujikawa b1f807abd1 Reformat lines with clang-format-3.5 2014-11-27 23:56:30 +09:00
Alexis La Goutte 9a3cdeb7e6 Fix some other shorten-64-to-32 casting error found by MSVC (64bits)
Thanks for Pascal
2014-06-16 19:17:49 +02:00
Tatsuhiro Tsujikawa 9b174bf5c9 Fix compile error with -Wshorten-64-to-32
The original patch was contributed by Alexis La Goutte
2014-06-11 23:37:16 +09:00
Tatsuhiro Tsujikawa 88b69bb669 Reduce huffman decoding table
Previously we have uint16_t as state member variable in
nghttp2_huff_decode structure to express -1 as failure.  This is
because we have 256 valid states.  However, we can express failed
state using flags member variable and make state uint8_t.  This commit
does this and as a result the size of decoding table is reduced.
2014-05-31 00:19:30 +09:00
Tatsuhiro Tsujikawa 5e6a2fa256 Assert ctx->state >= 0 in huffman decoding 2014-05-28 00:30:11 +09:00
Tatsuhiro Tsujikawa ab2dc5967d Replace HTTP/2.0 with HTTP/2 2014-03-30 19:26:37 +09:00
Tatsuhiro Tsujikawa d07bb1ddff Rework outbound frame buffers 2014-03-13 22:11:02 +09:00
Tatsuhiro Tsujikawa 3f56c938d8 nghttp2_hd: Use nghttp2_bufs, avoiding realloc() 2014-03-11 21:18:28 +09:00
Tatsuhiro Tsujikawa fd88c6160d HPACK post -05 updates
* Use 1 Huffman code table for both request and response
* Remove complicated deflater side table size management
* Add encoding context update
* Fix memory leak in inflater
2014-02-13 23:22:52 +09:00
Tatsuhiro Tsujikawa 8317559090 nghttp2_hd: Implement stream header inflater
This stream inflater can inflate incoming header block in streaming
fashion. Currently, we buffer up single name/value pair, but we chose
far more smaller buffer size than HTTP/2 frame size.
2014-01-25 18:24:15 +09:00
Tatsuhiro Tsujikawa f8a446fbeb nghttp2_hd: Rewrite huffman decoding 2014-01-24 21:56:19 +09:00
Tatsuhiro Tsujikawa 9eb031ce83 nghttp2_hd: Avoid nghttp2_hd_huff_decode_count
Huffman decoding is costly. It is faster to do geometric realloc
than calling nghttp2_hd_huff_decode_count to know the length in
advance.
2014-01-07 21:44:56 +09:00
Tatsuhiro Tsujikawa 7a9eca1f7d nghttp2_hd: Simplify huffman encode 2013-12-19 23:02:48 +09:00
Tatsuhiro Tsujikawa 12144acf4d nghttp2_hd: Check last byte of huffman encoded byte string strictly 2013-12-18 21:27:16 +09:00
Tatsuhiro Tsujikawa d92a161c46 nghttp2_hd_huffman: Code cleanup 2013-11-05 23:34:58 +09:00
Tatsuhiro Tsujikawa 0d6faa74b7 nghttp2_hd_huffman: Avoid memset on encoding 2013-11-03 22:31:06 +09:00
Tatsuhiro Tsujikawa d5ccc89fc4 Update huffman table and static table
Use huffman table in https://github.com/grmocg/httpbis-header-compression
2013-10-21 23:56:14 +09:00
Tatsuhiro Tsujikawa 9e50ae46d9 nghttp_hd: Use NGHTTP2_HD_SIDE_{REQUEST,RESPONSE} instead of {CLIENT,SERVER}
This change conveys better notion about compression context.
2013-10-21 00:44:39 +09:00
Tatsuhiro Tsujikawa 50cdcca911 Implement static Huffman for header compression
The current implementation uses Huffman code tables described
in http://tools.ietf.org/html/draft-rpeon-httpbis-header-compression-03
2013-10-15 23:55:12 +09:00