mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
149b3af105
This imports the MIT licensed js unzip from: https://github.com/imaya/zlib.js and uses it to decompress in js on the client side.
18 lines
374 B
Perl
Executable File
18 lines
374 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
my $ARRAYNAME = $ARGV[0];
|
|
print "static const char $ARRAYNAME\[\] = \"";
|
|
|
|
for ($i = 1; $i <= $#ARGV; $i = $i + 1) {
|
|
my $FILENAME = $ARGV[$i];
|
|
open FILE, $FILENAME or die "Cannot open $FILENAME";
|
|
while (my $line = <FILE>) {
|
|
foreach my $c (split //, $line) {
|
|
printf ("\\x%02x", ord ($c));
|
|
}
|
|
}
|
|
}
|
|
|
|
print "\";\n";
|
|
|