From: Alexey Tourbin <at@altlinux.ru> To: sisyphus@altlinux.ru Subject: [sisyphus] Re: Q: PerlIO::via::gzip Date: Sat, 24 Apr 2004 10:17:19 +0400 Message-ID: <20040424061719.GC1886@solemn.turbinal.org> (raw) In-Reply-To: <40875EB5.000008.08830@pantene.yandex.ru> [-- Attachment #1: Type: text/plain, Size: 1291 bytes --] On Thu, Apr 22, 2004 at 09:57:09AM +0400, Alex Ott wrote: > >> А в перле кто-нибудь разбирается? Нарисовал тут. > >> Смотрю на это и думаю: ы? > >> > >> package PerlIO::via::gzip; > Вопрос неправильно сформулирован -- правильный вопрос -- "зачем > изобретать велосипед, когда есть PerlIO::gzip и Tie::Gzip?" ;-) Да (более того, вопрос вообще не сформулирован, если не считать формулировку "ы" синонимом "для тех, кто понял"). Дело в том, что PerlIO::gzip -- это бинарная привязка к zlib (частный случай), а Tie::Gzip -- это та же обертка над Compress::Zlib, которая суть общий случай привязки к zlib. Недостатки PerlIO::gzip легко отыскивается в README: Compression and Decompression are implemented, but not together. If you attempt to open a file for reading and writing the open will fail. Threads - Currenly this module isn't threadsafe as it can't clone an open layer. flush() doesn't really flush, just empty the buffer. Т.е. это Николас Кларк как раз и изобрел велосипед, не велосипед даже, а так... костыль с колесом. В мандраке этот костыль с колесом прикрутили в pp_ctl.c, см. Cooker-SPECS/perl/perl-5.8.0-use_gzip_layer.patch Т.е. через PerlIO привязку сделать проще и веселее (stacked и т.д.). Только почему-то никто не делает... [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-04-24 6:17 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-04-21 1:46 [sisyphus] " Alexey Tourbin 2004-04-22 4:13 ` iLya Bryzgalow 2004-04-22 5:57 ` Alex Ott 2004-04-24 6:17 ` Alexey Tourbin [this message] 2004-04-24 6:19 ` [sisyphus] " Alexey Tourbin 2004-04-24 14:25 ` [sisyphus] JT PDP5 (was: PerlIO::via::gzip) Alexey Tourbin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040424061719.GC1886@solemn.turbinal.org \ --to=at@altlinux.ru \ --cc=sisyphus@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git