summaryrefslogtreecommitdiff
path: root/lib/coderay/helpers
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-13 05:33:14 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-13 05:33:14 +0200
commite423275749744fb2cf768087a07b4c839eaf4734 (patch)
treed7b4503894b6170e297f7b5aa2a052dc33c50757 /lib/coderay/helpers
parent8e67efef5b412b16d755fb47538e24a2b6bafce0 (diff)
downloadcoderay-e423275749744fb2cf768087a07b4c839eaf4734.tar.gz
remove dump/undump functionality
Diffstat (limited to 'lib/coderay/helpers')
-rw-r--r--lib/coderay/helpers/gzip.rb41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/coderay/helpers/gzip.rb b/lib/coderay/helpers/gzip.rb
deleted file mode 100644
index 245014a..0000000
--- a/lib/coderay/helpers/gzip.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-module CodeRay
-
- # A simplified interface to the gzip library +zlib+ (from the Ruby Standard Library.)
- module GZip
-
- require 'zlib'
-
- # The default zipping level. 7 zips good and fast.
- DEFAULT_GZIP_LEVEL = 7
-
- # Unzips the given string +s+.
- #
- # Example:
- # require 'gzip_simple'
- # print GZip.gunzip(File.read('adresses.gz'))
- def GZip.gunzip s
- Zlib::Inflate.inflate s
- end
-
- # Zips the given string +s+.
- #
- # Example:
- # require 'gzip_simple'
- # File.open('adresses.gz', 'w') do |file
- # file.write GZip.gzip('Mum: 0123 456 789', 9)
- # end
- #
- # If you provide a +level+, you can control how strong
- # the string is compressed:
- # - 0: no compression, only convert to gzip format
- # - 1: compress fast
- # - 7: compress more, but still fast (default)
- # - 8: compress more, slower
- # - 9: compress best, very slow
- def GZip.gzip s, level = DEFAULT_GZIP_LEVEL
- Zlib::Deflate.new(level).deflate s, Zlib::FINISH
- end
-
- end
-
-end