Results for: "strip"

Zlib::ZStream is the abstract class for the stream which handles the compressed data. The operations are defined in the subclasses: Zlib::Deflate for compression, and Zlib::Inflate for decompression.

An instance of Zlib::ZStream has one stream (struct zstream in the source) and two variable-length buffers which associated to the input (next_in) of the stream and the output (next_out) of the stream. In this document, “input buffer” means the buffer for input, and “output buffer” means the buffer for output.

Data input into an instance of Zlib::ZStream are temporally stored into the end of input buffer, and then data in input buffer are processed from the beginning of the buffer until no more output from the stream is produced (i.e. until avail_out > 0 after processing). During processing, output buffer is allocated and expanded automatically to hold all output data.

Some particular instance methods consume the data in output buffer and return them as a String.

Here is an ascii art for describing above:

+================ an instance of Zlib::ZStream ================+
||                                                            ||
||     +--------+          +-------+          +--------+      ||
||  +--| output |<---------|zstream|<---------| input  |<--+  ||
||  |  | buffer |  next_out+-------+next_in   | buffer |   |  ||
||  |  +--------+                             +--------+   |  ||
||  |                                                      |  ||
+===|======================================================|===+
    |                                                      |
    v                                                      |
"output data"                                         "input data"

If an error occurs during processing input buffer, an exception which is a subclass of Zlib::Error is raised. At that time, both input and output buffer keep their conditions at the time when the error occurs.

Method Catalogue

Many of the methods in this class are fairly low-level and unlikely to be of interest to users. In fact, users are unlikely to use this class directly; rather they will be interested in Zlib::Inflate and Zlib::Deflate.

The higher level methods are listed below.

Zlib::GzipWriter is a class for writing gzipped files. GzipWriter should be used with an instance of IO, or IO-like, object.

Following two example generate the same result.

Zlib::GzipWriter.open('hoge.gz') do |gz|
  gz.write 'jugemu jugemu gokou no surikire...'
end

File.open('hoge.gz', 'w') do |f|
  gz = Zlib::GzipWriter.new(f)
  gz.write 'jugemu jugemu gokou no surikire...'
  gz.close
end

To make like gzip(1) does, run following:

orig = 'hoge.txt'
Zlib::GzipWriter.open('hoge.gz') do |gz|
  gz.mtime = File.mtime(orig)
  gz.orig_name = orig
  gz.write IO.binread(orig)
end

NOTE: Due to the limitation of Ruby’s finalizer, you must explicitly close GzipWriter objects by Zlib::GzipWriter#close etc. Otherwise, GzipWriter will be not able to write the gzip footer and will generate a broken gzip file.

The InstructionSequence class represents a compiled sequence of instructions for the Virtual Machine used in MRI. Not all implementations of Ruby may implement this class, and for the implementations that implement it, the methods defined and behavior of the methods can change in any version.

With it, you can get a handle to the instructions that make up a method or a proc, compile strings of Ruby code down to VM instructions, and disassemble instruction sequences to strings for easy inspection. It is mostly useful if you want to learn how YARV works, but it also lets you control various settings for the Ruby iseq compiler.

You can find the source for the VM instructions in insns.def in the Ruby source.

The instruction sequence results will almost certainly change as Ruby changes, so example output in this documentation may be different from what you see.

Of course, this class is MRI specific.

No documentation available

HTTPGenericRequest is the parent of the Net::HTTPRequest class.

Do not use this directly; instead, use a subclass of Net::HTTPRequest.

About the Examples

Response class for URI Too Long responses (status code 414).

The URI provided was too long for the server to process.

References:

Response class for URI Too Long responses (status code 414).

The URI provided was too long for the server to process.

References:

Response class for Request Header Fields Too Large responses (status code 431).

An individual header field is too large, or all the header fields collectively, are too large.

References:

No documentation available

Represents the use of the ‘&&=` operator for assignment to a class variable.

@@target &&= value
^^^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a class variable.

@@target ||= value
^^^^^^^^^^^^^^^^^^

Represents assigning to a class variable using an operator that isn’t ‘=`.

@@target += value
^^^^^^^^^^^^^^^^^

Represents the use of the ‘&&=` operator for assignment to a constant.

Target &&= value
^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a constant.

Target ||= value
^^^^^^^^^^^^^^^^

Represents assigning to a constant using an operator that isn’t ‘=`.

Target += value
^^^^^^^^^^^^^^^

Represents the use of the ‘&&=` operator for assignment to a global variable.

$target &&= value
^^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a global variable.

$target ||= value
^^^^^^^^^^^^^^^^^

Represents assigning to a global variable using an operator that isn’t ‘=`.

$target += value
^^^^^^^^^^^^^^^^

Represents the use of the ‘&&=` operator for assignment to a local variable.

target &&= value
^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a local variable.

target ||= value
^^^^^^^^^^^^^^^^

Represents assigning to a local variable using an operator that isn’t ‘=`.

target += value
^^^^^^^^^^^^^^^

Represents writing to a class variable.

@@foo = 1
^^^^^^^^^

Represents the use of the ‘&&=` operator for assignment to a constant path.

Parent::Child &&= value
^^^^^^^^^^^^^^^^^^^^^^^

Represents assigning to a constant path using an operator that isn’t ‘=`.

Parent::Child += value
^^^^^^^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a constant path.

Parent::Child ||= value
^^^^^^^^^^^^^^^^^^^^^^^
Search took: 8ms  ·  Total Results: 2417