Module: Ronin::Support::Compression::Mixin
- Included in:
- Mixin
- Defined in:
- lib/ronin/support/compression/mixin.rb
Overview
Provides helper methods for compression algorithms/formats.
Instance Method Summary collapse
-
#gunzip(path) {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Reader
Opens the gzipped file for reading.
-
#gzip(path) {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Writer
Opens the gzip file for writing.
-
#gzip_open(path, mode: 'r') {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Reader, Ronin::Support::Compression::Gzip::Writer
Opens a gzip file for reading or writing.
-
#gzip_stream(io, mode: 'r') {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Reader, Ronin::Support::Compression::Gzip::Writer
Creates a gzip stream around the IO object.
-
#zlib_deflate(string) ⇒ String
Zlib deflate a string.
-
#zlib_inflate(string) ⇒ String
Zlib inflate a string.
Instance Method Details
#gunzip(path) {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Reader
Opens the gzipped file for reading.
151 152 153 |
# File 'lib/ronin/support/compression/mixin.rb', line 151 def gunzip(path,&block) Compression.gunzip(path,&block) end |
#gzip(path) {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Writer
Opens the gzip file for writing.
174 175 176 |
# File 'lib/ronin/support/compression/mixin.rb', line 174 def gzip(path,&block) Compression.gzip(path,&block) end |
#gzip_open(path, mode: 'r') {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Reader, Ronin::Support::Compression::Gzip::Writer
Opens a gzip file for reading or writing.
128 129 130 |
# File 'lib/ronin/support/compression/mixin.rb', line 128 def gzip_open(path, mode: 'r', &block) Compression.gzip_open(path,mode: mode,&block) end |
#gzip_stream(io, mode: 'r') {|gz| ... } ⇒ Ronin::Support::Compression::Gzip::Reader, Ronin::Support::Compression::Gzip::Writer
Creates a gzip stream around the IO object.
98 99 100 |
# File 'lib/ronin/support/compression/mixin.rb', line 98 def gzip_stream(io, mode: 'r', &block) Compression.gzip_stream(io,mode: mode,&block) end |
#zlib_deflate(string) ⇒ String
Zlib deflate a string.
66 67 68 |
# File 'lib/ronin/support/compression/mixin.rb', line 66 def zlib_deflate(string) Compression.zlib_deflate(string) end |
#zlib_inflate(string) ⇒ String
Zlib inflate a string.
47 48 49 |
# File 'lib/ronin/support/compression/mixin.rb', line 47 def zlib_inflate(string) Compression.zlib_inflate(string) end |