On Mon, Oct 5, 2009 at 5:02 PM, Bryan R Harris <bryan_r_har...@raytheon.com>wrote:
> > > > I have about 60 MB of text data I want to include at the bottom of a > script. > > 60 MB is too big for us, but compressed it would be probably only 3-6 MB > which is much better. Is there any way to put gzipped data in the DATA > section of a script, and have the main body of the script conveniently read > it? > > I'd also prefer that my script be able to survive getting passed through a > terminal -- is it hard to encode the data block (MIME perhaps?) so it will? > i.e. low ascii characters line wrapped? > > TIA! > > - Bryan > > > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > Hi Bryan, I have never tried this but I think that should be possible. You can after all see the data as binary. If you see it as that you could use a module, or a system call to gunzip depending on your preference to expand this data to it's original format by simply feeding it this binary information. The only reason people don't do that is because most of the time it makes very little sense as most DATA blocks if present are no more then a few lines in size. The biggest problem I expect will be once you have unzipped the data you will want to split it into a usable format as I doubt we are talking about a massive string of text. Since any unzip method will simply return you a data stream you will need to figure out a way to deal with this stream. Besides that I believe it might actually be possible to do this. Regards, Rob