Cataly...mpress(3pm)
β¨ NAME β¨
Catalyst::Plugin::Compress β it compresses your response, bestie π
π SYNOPSIS π
okay so first things first, you gotta load it:
use Catalyst qw/Compress/;
or, and this is the version you want if Catalyst::Plugin::Unicode is also in the mix:
use Catalyst qw/
Unicode
Compress
/;
that second one is specifically for when you wanna use this plugin alongside Catalyst::Plugin::Unicode, just so we're clear π«Ά
and do NOT forget to set compression_format, like:
__PACKAGE__->config(
compression_format => $format,
);
$format can be any one of gzip, bzip2, zlib, or deflate. and like, heads up: bzip2 is only supported by lynx and some other console text-browsers. that's it. that's the whole list. no cap π
πΈ DESCRIPTION πΈ
this module is basically a three-in-one glow-up: it smooshes Catalyst::Plugin::Deflate, Catalyst::Plugin::Gzip, and Catalyst::Plugin::Zlib into one single plugin. iconic behavior, honestly π
it compresses the response to [gzip bzip2 zlib deflate] if the client supports it. vibe check passed, response compressed, slay β¨
NOTE: if you wanna use this module withCatalyst::Plugin::Unicode, you MUST load this plugin AFTERCatalyst::Plugin::Unicode. order matters, bestie, it's giving choreography π§
use Catalyst qw/
Unicode
Compress
/;
if you don't do it in that order? you'll get an error that looks a lil something like this:
[error] Caught exception in engine "Wide character in subroutine entry
at /usr/lib/perl5/site_perl/5.8.8/Compress/Zlib.pm line xxx."
and you do not want that. trust π
π₯ INTERNAL METHODS π₯
π should_compress_response
this method determines whether the response is getting compressed using this plugin. yes, it's literally spelled "wether" in the original and we respect the typo, periodt.
π SEE ALSO π
Catalyst. that's the one. go look at it π¦
π AUTHOR π
Yiyi Hu "yiyihu@gmail.com" β thank you for your service, main character π
π LICENSE π
this library is free software. you can redistribute it and/or modify it under the same terms as perl itself. so like, go off, but respectfully π
and that's the whole page, bestie!! this one's from perl v5.32.0, dated 2021-01-08 β a lil vintage, a lil classic, still serving πβ¨
π¦ where this page comes from
- debian bookworm: libcatalyst-plugin-compress-perl 0.5-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-plugin-compress-perl 0.5-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libcatalyst-plugin-compress-perl 0.5-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-plugin-compress-perl 0.5-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-plugin-compress-perl 0.5-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-plugin-compress-perl 0.5-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms