Permalink
Browse files

Add Zlib::ZStream#flush_next_in

More work on issue #1561
  • Loading branch information...
1 parent 922b25c commit 9996ab52d40a0f26bba0cd8c3ce2778c253d0d61 @IPGlider IPGlider committed Apr 24, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/zlib.rb.ffi
View
@@ -333,6 +333,18 @@ module Zlib
self[:data_type]
end
+ def detach_input
+ if @input.nil? then
+ data = ''
+ else
+ data = @input
+
+ reset_input
+ end
+
+ data
+ end
+
def detach_output
if @output.nil? then
data = ''
@@ -414,6 +426,10 @@ module Zlib
alias :stream_end? :finished?
+ def flush_next_in
+ detach_input
+ end
+
##
# Flushes output buffer and returns all data in that buffer.

0 comments on commit 9996ab5

Please sign in to comment.