http://www.wiki.crossplatform.ru/index.php?title=Ruby/Development/zip&feed=atom&action=history
Ruby/Development/zip - История изменений
2024-03-28T09:24:55Z
История изменений этой страницы в вики
MediaWiki 1.15.1
http://www.wiki.crossplatform.ru/index.php?title=Ruby/Development/zip&diff=7540&oldid=prev
ViGOur: 1 версия: Импорт выборки материалов по Ruby
2010-09-13T17:55:36Z
<p>1 версия: Импорт выборки материалов по Ruby</p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Предыдущая</td>
<td colspan='2' style="background-color: white; color:black;">Версия 17:55, 13 сентября 2010</td>
</tr>
<!-- diff generator: internal 2024-03-28 09:24:56 -->
</table>
ViGOur
http://www.wiki.crossplatform.ru/index.php?title=Ruby/Development/zip&diff=7539&oldid=prev
в 17:10, 26 мая 2010
2010-05-26T17:10:41Z
<p></p>
<p><b>Новая страница</b></p><div>==Append to a zip file==<br />
<br />
<br />
<br />
<br />
<!-- start source code --><br />
<br />
<source lang="ruby"><br />
<br />
require "zlib"<br />
file = "compressed.gz"<br />
Zlib::GzipWriter.open(file) do |gzip|<br />
gzip << "this is a test."<br />
gzip.close<br />
end<br />
<br />
open("compressed.gz", "wb") do |file|<br />
gzip = Zlib::GzipWriter.new(file)<br />
gzip << "this is a test."<br />
gzip.close<br />
end<br />
</source><br />
<br />
<br />
<br />
<br />
==Compressing and Archiving Files with Gzip and Tar==<br />
<br />
<br />
<br />
<br />
<!-- start source code --><br />
<br />
<source lang="ruby"><br />
<br />
require "zlib"<br />
file = "compressed.gz"<br />
Zlib::GzipWriter.open(file) do |gzip|<br />
gzip << "this is a test."<br />
gzip.close<br />
end<br />
open(file, "rb") { |f| f.read(10) }<br />
Zlib::GzipReader.open(file) { |gzip| puts gzip.read }<br />
</source><br />
<br />
<br />
<br />
<br />
==Inflate and deflate a string==<br />
<br />
<br />
<br />
<br />
<!-- start source code --><br />
<br />
<source lang="ruby"><br />
<br />
require "zlib"<br />
deflated = Zlib::Deflate.deflate("this is a test.")<br />
puts deflated<br />
puts Zlib::Inflate.inflate(deflated)<br />
</source></div>