Skip to content

Commit 00bbfe0

Browse files
committed
Dedup zlib docs
1 parent 2809f6a commit 00bbfe0

18 files changed

+32
-1394
lines changed

stdlib/zlib/0/buf_error.rbs

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,4 @@
1-
# <!-- rdoc-file=ext/zlib/zlib.c -->
2-
# This module provides access to the [zlib library](http://zlib.net). Zlib is
3-
# designed to be a portable, free, general-purpose, legally unencumbered -- that
4-
# is, not covered by any patents -- lossless data-compression library for use on
5-
# virtually any computer hardware and operating system.
6-
#
7-
# The zlib compression library provides in-memory compression and decompression
8-
# functions, including integrity checks of the uncompressed data.
9-
#
10-
# The zlib compressed data format is described in RFC 1950, which is a wrapper
11-
# around a deflate stream which is described in RFC 1951.
12-
#
13-
# The library also supports reading and writing files in gzip (.gz) format with
14-
# an interface similar to that of IO. The gzip format is described in RFC 1952
15-
# which is also a wrapper around a deflate stream.
16-
#
17-
# The zlib format was designed to be compact and fast for use in memory and on
18-
# communications channels. The gzip format was designed for single-file
19-
# compression on file systems, has a larger header than zlib to maintain
20-
# directory information, and uses a different, slower check method than zlib.
21-
#
22-
# See your system's zlib.h for further information about zlib
23-
#
24-
# ## Sample usage
25-
#
26-
# Using the wrapper to compress strings with default parameters is quite simple:
27-
#
28-
# require "zlib"
29-
#
30-
# data_to_compress = File.read("don_quixote.txt")
31-
#
32-
# puts "Input size: #{data_to_compress.size}"
33-
# #=> Input size: 2347740
34-
#
35-
# data_compressed = Zlib::Deflate.deflate(data_to_compress)
36-
#
37-
# puts "Compressed size: #{data_compressed.size}"
38-
# #=> Compressed size: 887238
39-
#
40-
# uncompressed_data = Zlib::Inflate.inflate(data_compressed)
41-
#
42-
# puts "Uncompressed data is: #{uncompressed_data}"
43-
# #=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote...
44-
#
45-
# ## Class tree
46-
#
47-
# * Zlib::Deflate
48-
# * Zlib::Inflate
49-
# * Zlib::ZStream
50-
# * Zlib::Error
51-
# * Zlib::StreamEnd
52-
# * Zlib::NeedDict
53-
# * Zlib::DataError
54-
# * Zlib::StreamError
55-
# * Zlib::MemError
56-
# * Zlib::BufError
57-
# * Zlib::VersionError
58-
# * Zlib::InProgressError
59-
#
60-
#
61-
#
62-
# (if you have GZIP_SUPPORT)
63-
# * Zlib::GzipReader
64-
# * Zlib::GzipWriter
65-
# * Zlib::GzipFile
66-
# * Zlib::GzipFile::Error
67-
# * Zlib::GzipFile::LengthError
68-
# * Zlib::GzipFile::CRCError
69-
# * Zlib::GzipFile::NoFooter
70-
#
1+
%a{annotate:rdoc:skip}
712
module Zlib
723
# <!-- rdoc-file=ext/zlib/zlib.c -->
734
# Subclass of Zlib::Error when zlib returns a Z_BUF_ERROR.

stdlib/zlib/0/data_error.rbs

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,4 @@
1-
# <!-- rdoc-file=ext/zlib/zlib.c -->
2-
# This module provides access to the [zlib library](http://zlib.net). Zlib is
3-
# designed to be a portable, free, general-purpose, legally unencumbered -- that
4-
# is, not covered by any patents -- lossless data-compression library for use on
5-
# virtually any computer hardware and operating system.
6-
#
7-
# The zlib compression library provides in-memory compression and decompression
8-
# functions, including integrity checks of the uncompressed data.
9-
#
10-
# The zlib compressed data format is described in RFC 1950, which is a wrapper
11-
# around a deflate stream which is described in RFC 1951.
12-
#
13-
# The library also supports reading and writing files in gzip (.gz) format with
14-
# an interface similar to that of IO. The gzip format is described in RFC 1952
15-
# which is also a wrapper around a deflate stream.
16-
#
17-
# The zlib format was designed to be compact and fast for use in memory and on
18-
# communications channels. The gzip format was designed for single-file
19-
# compression on file systems, has a larger header than zlib to maintain
20-
# directory information, and uses a different, slower check method than zlib.
21-
#
22-
# See your system's zlib.h for further information about zlib
23-
#
24-
# ## Sample usage
25-
#
26-
# Using the wrapper to compress strings with default parameters is quite simple:
27-
#
28-
# require "zlib"
29-
#
30-
# data_to_compress = File.read("don_quixote.txt")
31-
#
32-
# puts "Input size: #{data_to_compress.size}"
33-
# #=> Input size: 2347740
34-
#
35-
# data_compressed = Zlib::Deflate.deflate(data_to_compress)
36-
#
37-
# puts "Compressed size: #{data_compressed.size}"
38-
# #=> Compressed size: 887238
39-
#
40-
# uncompressed_data = Zlib::Inflate.inflate(data_compressed)
41-
#
42-
# puts "Uncompressed data is: #{uncompressed_data}"
43-
# #=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote...
44-
#
45-
# ## Class tree
46-
#
47-
# * Zlib::Deflate
48-
# * Zlib::Inflate
49-
# * Zlib::ZStream
50-
# * Zlib::Error
51-
# * Zlib::StreamEnd
52-
# * Zlib::NeedDict
53-
# * Zlib::DataError
54-
# * Zlib::StreamError
55-
# * Zlib::MemError
56-
# * Zlib::BufError
57-
# * Zlib::VersionError
58-
# * Zlib::InProgressError
59-
#
60-
#
61-
#
62-
# (if you have GZIP_SUPPORT)
63-
# * Zlib::GzipReader
64-
# * Zlib::GzipWriter
65-
# * Zlib::GzipFile
66-
# * Zlib::GzipFile::Error
67-
# * Zlib::GzipFile::LengthError
68-
# * Zlib::GzipFile::CRCError
69-
# * Zlib::GzipFile::NoFooter
70-
#
1+
%a{annotate:rdoc:skip}
712
module Zlib
723
# <!-- rdoc-file=ext/zlib/zlib.c -->
734
# Subclass of Zlib::Error when zlib returns a Z_DATA_ERROR.

stdlib/zlib/0/deflate.rbs

Lines changed: 8 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,4 @@
1-
# <!-- rdoc-file=ext/zlib/zlib.c -->
2-
# This module provides access to the [zlib library](http://zlib.net). Zlib is
3-
# designed to be a portable, free, general-purpose, legally unencumbered -- that
4-
# is, not covered by any patents -- lossless data-compression library for use on
5-
# virtually any computer hardware and operating system.
6-
#
7-
# The zlib compression library provides in-memory compression and decompression
8-
# functions, including integrity checks of the uncompressed data.
9-
#
10-
# The zlib compressed data format is described in RFC 1950, which is a wrapper
11-
# around a deflate stream which is described in RFC 1951.
12-
#
13-
# The library also supports reading and writing files in gzip (.gz) format with
14-
# an interface similar to that of IO. The gzip format is described in RFC 1952
15-
# which is also a wrapper around a deflate stream.
16-
#
17-
# The zlib format was designed to be compact and fast for use in memory and on
18-
# communications channels. The gzip format was designed for single-file
19-
# compression on file systems, has a larger header than zlib to maintain
20-
# directory information, and uses a different, slower check method than zlib.
21-
#
22-
# See your system's zlib.h for further information about zlib
23-
#
24-
# ## Sample usage
25-
#
26-
# Using the wrapper to compress strings with default parameters is quite simple:
27-
#
28-
# require "zlib"
29-
#
30-
# data_to_compress = File.read("don_quixote.txt")
31-
#
32-
# puts "Input size: #{data_to_compress.size}"
33-
# #=> Input size: 2347740
34-
#
35-
# data_compressed = Zlib::Deflate.deflate(data_to_compress)
36-
#
37-
# puts "Compressed size: #{data_compressed.size}"
38-
# #=> Compressed size: 887238
39-
#
40-
# uncompressed_data = Zlib::Inflate.inflate(data_compressed)
41-
#
42-
# puts "Uncompressed data is: #{uncompressed_data}"
43-
# #=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote...
44-
#
45-
# ## Class tree
46-
#
47-
# * Zlib::Deflate
48-
# * Zlib::Inflate
49-
# * Zlib::ZStream
50-
# * Zlib::Error
51-
# * Zlib::StreamEnd
52-
# * Zlib::NeedDict
53-
# * Zlib::DataError
54-
# * Zlib::StreamError
55-
# * Zlib::MemError
56-
# * Zlib::BufError
57-
# * Zlib::VersionError
58-
# * Zlib::InProgressError
59-
#
60-
#
61-
#
62-
# (if you have GZIP_SUPPORT)
63-
# * Zlib::GzipReader
64-
# * Zlib::GzipWriter
65-
# * Zlib::GzipFile
66-
# * Zlib::GzipFile::Error
67-
# * Zlib::GzipFile::LengthError
68-
# * Zlib::GzipFile::CRCError
69-
# * Zlib::GzipFile::NoFooter
70-
#
1+
%a{annotate:rdoc:skip}
712
module Zlib
723
# <!-- rdoc-file=ext/zlib/zlib.c -->
734
# Zlib::Deflate is the class for compressing data. See Zlib::ZStream for more
@@ -126,10 +57,13 @@ module Zlib
12657
#
12758
# Zlib::NO_FLUSH
12859
# : The default
60+
#
12961
# Zlib::SYNC_FLUSH
13062
# : Flushes the output to a byte boundary
63+
#
13164
# Zlib::FULL_FLUSH
13265
# : SYNC_FLUSH + resets the compression state
66+
#
13367
# Zlib::FINISH
13468
# : Pending input is processed, pending output is flushed.
13569
#
@@ -198,7 +132,6 @@ module Zlib
198132
# * Zlib::BEST_SPEED
199133
# * Zlib::BEST_COMPRESSION
200134
#
201-
#
202135
# See http://www.zlib.net/manual.html#Constants for further information.
203136
#
204137
# The `window_bits` sets the size of the history buffer and should be between 8
@@ -213,18 +146,21 @@ module Zlib
213146
# * Zlib::DEF_MEM_LEVEL
214147
# * Zlib::MAX_MEM_LEVEL
215148
#
216-
#
217149
# The `strategy` sets the deflate compression strategy. The following
218150
# strategies are available:
219151
#
220152
# Zlib::DEFAULT_STRATEGY
221153
# : For normal data
154+
#
222155
# Zlib::FILTERED
223156
# : For data produced by a filter or predictor
157+
#
224158
# Zlib::FIXED
225159
# : Prevents dynamic Huffman codes
160+
#
226161
# Zlib::HUFFMAN_ONLY
227162
# : Prevents string matching
163+
#
228164
# Zlib::RLE
229165
# : Designed for better compression of PNG image data
230166
#

stdlib/zlib/0/error.rbs

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,4 @@
1-
# <!-- rdoc-file=ext/zlib/zlib.c -->
2-
# This module provides access to the [zlib library](http://zlib.net). Zlib is
3-
# designed to be a portable, free, general-purpose, legally unencumbered -- that
4-
# is, not covered by any patents -- lossless data-compression library for use on
5-
# virtually any computer hardware and operating system.
6-
#
7-
# The zlib compression library provides in-memory compression and decompression
8-
# functions, including integrity checks of the uncompressed data.
9-
#
10-
# The zlib compressed data format is described in RFC 1950, which is a wrapper
11-
# around a deflate stream which is described in RFC 1951.
12-
#
13-
# The library also supports reading and writing files in gzip (.gz) format with
14-
# an interface similar to that of IO. The gzip format is described in RFC 1952
15-
# which is also a wrapper around a deflate stream.
16-
#
17-
# The zlib format was designed to be compact and fast for use in memory and on
18-
# communications channels. The gzip format was designed for single-file
19-
# compression on file systems, has a larger header than zlib to maintain
20-
# directory information, and uses a different, slower check method than zlib.
21-
#
22-
# See your system's zlib.h for further information about zlib
23-
#
24-
# ## Sample usage
25-
#
26-
# Using the wrapper to compress strings with default parameters is quite simple:
27-
#
28-
# require "zlib"
29-
#
30-
# data_to_compress = File.read("don_quixote.txt")
31-
#
32-
# puts "Input size: #{data_to_compress.size}"
33-
# #=> Input size: 2347740
34-
#
35-
# data_compressed = Zlib::Deflate.deflate(data_to_compress)
36-
#
37-
# puts "Compressed size: #{data_compressed.size}"
38-
# #=> Compressed size: 887238
39-
#
40-
# uncompressed_data = Zlib::Inflate.inflate(data_compressed)
41-
#
42-
# puts "Uncompressed data is: #{uncompressed_data}"
43-
# #=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote...
44-
#
45-
# ## Class tree
46-
#
47-
# * Zlib::Deflate
48-
# * Zlib::Inflate
49-
# * Zlib::ZStream
50-
# * Zlib::Error
51-
# * Zlib::StreamEnd
52-
# * Zlib::NeedDict
53-
# * Zlib::DataError
54-
# * Zlib::StreamError
55-
# * Zlib::MemError
56-
# * Zlib::BufError
57-
# * Zlib::VersionError
58-
# * Zlib::InProgressError
59-
#
60-
#
61-
#
62-
# (if you have GZIP_SUPPORT)
63-
# * Zlib::GzipReader
64-
# * Zlib::GzipWriter
65-
# * Zlib::GzipFile
66-
# * Zlib::GzipFile::Error
67-
# * Zlib::GzipFile::LengthError
68-
# * Zlib::GzipFile::CRCError
69-
# * Zlib::GzipFile::NoFooter
70-
#
1+
%a{annotate:rdoc:skip}
712
module Zlib
723
# <!-- rdoc-file=ext/zlib/zlib.c -->
734
# The superclass for all exceptions raised by Ruby/zlib.

0 commit comments

Comments
 (0)