Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / iostreams / filter / gzip.hpp
index fb18224..d7939c8 100644 (file)
@@ -32,7 +32,7 @@
 #include <boost/iostreams/detail/adapter/non_blocking_adapter.hpp>
 #include <boost/iostreams/detail/adapter/range_adapter.hpp>
 #include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // failure.
+#include <boost/iostreams/detail/ios.hpp> // failure, streamsize.
 #include <boost/iostreams/detail/error.hpp>
 #include <boost/iostreams/operations.hpp>
 #include <boost/iostreams/device/back_inserter.hpp>
@@ -143,11 +143,11 @@ struct gzip_params : zlib_params {
                  int window_bits        = gzip::default_window_bits,
                  int mem_level          = gzip::default_mem_level,
                  int strategy           = gzip::default_strategy,
-                 std::string file_name  = "",
-                 std::string comment    = "",
-                 std::time_t mtime      = 0 )
+                 std::string file_name_  = "",
+                 std::string comment_    = "",
+                 std::time_t mtime_      = 0 )
         : zlib_params(level, method, window_bits, mem_level, strategy),
-          file_name(file_name), comment(comment), mtime(mtime)
+          file_name(file_name_), comment(comment_), mtime(mtime_)
         { }
     std::string  file_name;
     std::string  comment;
@@ -197,7 +197,7 @@ public:
           closable_tag
         { };
     basic_gzip_compressor( const gzip_params& = gzip::default_compression,
-                           int buffer_size = default_device_buffer_size );
+                           std::streamsize buffer_size = default_device_buffer_size );
 
     template<typename Source>
     std::streamsize read(Source& src, char_type* s, std::streamsize n)
@@ -285,7 +285,7 @@ private:
         boost::iostreams::put(next, static_cast<char>(0xFF & (n >> 24)));
     }
     template<typename Sink>
-    static void write_long(long n, Sink& next, boost::mpl::false_)
+    static void write_long(long, Sink&, boost::mpl::false_)
     {
     }
     template<typename Sink>
@@ -411,7 +411,7 @@ public:
           closable_tag
         { };
     basic_gzip_decompressor( int window_bits = gzip::default_window_bits,
-                             int buffer_size = default_device_buffer_size );
+                             std::streamsize buffer_size = default_device_buffer_size );
 
     template<typename Sink>
     std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
@@ -505,7 +505,7 @@ public:
                 if (footer_.done()) {
                     if (footer_.crc() != this->crc())
                         boost::throw_exception(gzip_error(gzip::bad_crc));
-                    int c = boost::iostreams::get(peek);
+                    c = boost::iostreams::get(peek);
                     if (traits_type::is_eof(c)) {
                         state_ = s_done;
                     } else {
@@ -645,7 +645,7 @@ typedef basic_gzip_decompressor<> gzip_decompressor;
 
 template<typename Alloc>
 basic_gzip_compressor<Alloc>::basic_gzip_compressor
-    (const gzip_params& p, int buffer_size)
+    (const gzip_params& p, std::streamsize buffer_size)
     : base_type(normalize_params(p), buffer_size),
       offset_(0), flags_(0)
 {
@@ -731,7 +731,7 @@ std::streamsize basic_gzip_compressor<Alloc>::read_string
 
 template<typename Alloc>
 basic_gzip_decompressor<Alloc>::basic_gzip_decompressor
-    (int window_bits, int buffer_size)
+    (int window_bits, std::streamsize buffer_size)
     : base_type(make_params(window_bits), buffer_size),
       state_(s_start)
     { }