zip utility

R

Robin

How can I program a perl program where I design my own format of file
that is like a zip file and then extract and compress it.I have no
idea to do it.

use usenet responsibly,
-robin
 
S

sopan.shewale

How can I program a perl program where I design my own format of file
that is like a zip file and then extract and compress it.I have no
idea to do it.

use usenet responsibly,
-robin


are you talking about encrypting the file? Can you share more
information on exactly what you want to do?
 
J

Jürgen Exner

are you talking about encrypting the file? Can you share more
information on exactly what you want to do?

Well, he didn't mention anything about encryption. Apparently he wants
to reinvent compressed archives.

The only Perl-related topic I can see is maybe using pack()/unpack() and
probably binmode() to ensure that the archives are treated as binary
data and not accidentally as text.

jue
 
J

Jochen Lehmeier

The only Perl-related topic I can see is

Well.

We already have t-shirt-worthy Perl one-liners (or two-liners, actually)
for complete weapons-grade RSA en-/decryption.

Can it be so hard to write a one-liner for ZIP or gzip?
 
D

Dr.Ruud

Jochen said:
Can it be so hard to write a one-liner for ZIP or gzip?

That is probably done before, but is still a good one to end the year with.

perl -XXXe' #some code
' < file > file.gz

with the restrictions that
1. file.gz should generally be smaller than file
2. file can be reconstructed from file.gz by gunzip
3. the code doesn't call any other executable than perl

http://en.wikipedia.org/wiki/Gzip

(idem for ZIP/arc/etc.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top