#!/usr/bin/perl -w
# Copyright 2010 Kevin Ryde
# This file is part of Filter-gunzip.
#
# Filter-gunzip is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3, or (at your option) any later
# version.
#
# Filter-gunzip is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with Filter-gunzip. If not, see <http://www.gnu.org/licenses/>.
# This is an example of a self-uncompressing executable. Run it with
#
# ./self-gunzip.pl
#
# or
#
# perl self-gunzip.pl
#
# This file begins with the plain text you're reading now but immediately
# after the "use Filter::gunzip" line there's raw gzipped bytes. Of course
# there's no need for all this verbiage in a real script, it's enough to
# start with
#
# #!/usr/bin/perl -w
# use Filter::gunzip;
#
# The compressed bytes in this example come from the self-gunzip-part.pl
# file. They can be updated here by truncating after the "use" line and
# gzipping and appending,
#
# gzip -9 -c self-gunzip-part.pl >>self-gunzip.pl
#
# For real use you'd probably automate that, or more likely treat the .pl as
# the master and build the self-uncompressor with something like
#
# echo '#!/usr/bin/perl' >my-self-expander
# echo use 'Filter::gunzip;' >>my-self-expander
# gzip -9 -c self-gunzip-part.pl >>my-self-expander
#
use strict;
use warnings;
use Filter::gunzip;
â´ÒKself-gunzip-part.pl OÚ0ÅïùOËeW¢¶·¦ª"ØE¥BÐ
©L«Æl4ýôUÿ©jOIF/¿yofFv°²n<^M_NñÎR#J¢òF:TRøÙ
ëa*,¤òd_Ôþ*Û8±îRÐVÎT¾¦C!4,Òy+g¤ÐåÄXL)«êtI¾!0ñäBÃðñ¸Þã4Y¡°íJXÉ´#¶*®¡Çá"_pín°0Ì^$+,Îdãõlá^øàÒ´AõÀÖ(Ásþ%ëH%xv¡}cZöß0CöR) £ªSc°1ÏËüi³Ï®xN³,]çµ¾1éJ§VIs
+´Â<>γÙëÓ÷ËÕ2?0,ùz¾Ûa±Ébfùr¶_¥¶ûl»ÙÍc`GôY2ªºìGVR¹kè/б3U¢gâE$ÏìK àú-)£k&
¿°¬ ñ÷÷íɤïû¸Ö]ll=QW¼£?î²fF¬èÎwÅgðÜâs¤ªïZ
{G·ÝÀ-1w'÷Àp^Â:\ÞyîZêÚ%Qk¥ö¸»´þ©«ã£)§PSzØNÇñ'}Dô
O`Dß Èj