compress

SAS function to strip apostrophes from a character string (compress?)

I have a string which looks like this: "ABAR_VAL", "ACQ_EXPTAX_Y", "ACQ_EXP_TAX", "ADJ_MATHRES2" and I'd like it to look like this: ABAR_VAL ACQ_EXPTAX_Y ACQ_EXP_TAX ADJ_MATHRES2 ie no apostrophes or commas and single space seperated. What is the cleanest / shortest way to do so in SAS 9.1.3 ? preferably something along the lin...

How to cache Apaches GZIP compressed content

Apache has built in capabilities to GZIP content (HTML, JPG.. etc) Every time its done it uses slightly more CPU then it would normally. So my question, Is it possible to cache the end compressed version instead of having your machine doing it every single time. ...

Zip folder in C#

What is an example (simple code) of how to zip a folder in C#? Update: I do not see namespace ICSharpCode. I downloaded ICSharpCode.SharpZipLib.dll but I do not know where to copy that DLL file. What do I need to do to see this namespace? And do you have link for that MSDN example for compress folder, because I read all MSDN but I c...

Zlib in Delphi 2009

I am upgrading a app to Delphi 2009. The app uses Soap and we compress the soap request and response streams using Zlib. This works fine in Delphi 2006 but not in Delphi 2009. So I went back to Delphi 2006 and changed to use FastZlib. It all worked fine in Delphi2006 but does not work in Delphi 2009 and I get Decompress errors. Has any...

PNG compression with PHP magickwand

Hi fellow programmers, I'm wondering how to compress an PNG image correctly. The situation is this : I have a PNG image compressed and color-reduced with Irfanview on Windows. It's about 20KB. When my portal software resizes (using magickwand 1.0.7) it with default values, it's about 63K (!). Next try was to call MagickSetImageDepth...

How to compare two tarball's content

hi, I want to tell whether two tarball files contain identical files, in terms of file name and file content, not including meta-data like date, user, group. However, There are some restrictions: first, I have no control of whether the meta-data is included when making the tar file, actually, the tar file always contains meta-data, so d...

Split Files using tar ,gz,zip or bzip2

Hello, i need to compress file and it's giganitc file :D the size is about 17-20 GB i need to split it to files in size around 1GB for each part , i tried to googleit and found way using split,cat command and it did not work at all in large files , also it wont work in Windows i need to extarct it on windows machine, thanks in advance ...

Can compressed javascript be uncompressed

Is it possible to uncompress (if that's the right term even) for code like below? var vote=function(){var k={informModerator:-1,undoMod:0,acceptedByOwner:1,upMod:2,downMod:3,offensive:4,favorite:5,close:6,reopen:7,deletion:10,undeletion:11,spam:12};var f=imagePath+"vote-arrow-down.png";var c=imagePath+"vote-arrow-down-on.png";var x=imag...

With Mercurial, how can I "compress" a series of changesets into one before pushing?

Hi, Let's say I have a local and a remote Mercurial repository. Now, I start working on a feature. I work on it, and when I think it's done, I commit the changeset. Testing it a bit more, I find that I could further improve this feature by tweaking something in the code. I make the change and commit. 20 minutes later, I find there's a b...

CSSTidy is driving me crazy!!

Hi, I am on OS X + Python 2.6 + django 1.1. I have tried all possible solution available on the net i.e. http://thingsilearned.com/2009/01/02/installing-csstidy-and-scons-on-os-x-or-linux/ tried with python 2.5, 2.4 apple-python.. I just can't go past this error after installing scons $ /usr/local/bin/scons scons: *** No SConstruc...

compress binaries in SVN ?

Hi, I have written a script to compress and uncompress binary files of a selected directory (and the sub-directories). I need to activate the script before I commit files to SVN. Is there a way to use the pre-commit hook to execute the script? and if so, how do I give to the he script the root directory (so it would scan the sub-folde...

Wrapper to SVN commit and checkout for compressing.

Possible Duplicate: compress binaries in SVN ? exact duplicate by same author: compress binaries in SVN? Hi, I want to build a script to wrap the issues of commit and checkout. I want to compress binary files before commiting and to uncompress right after checkout. What is the way to do it? is the IMPORT command instead of C...

Command to Bulk Compress All Files / Folders Under a Directory

I'm looking for a command that will compress every folder within a directory separately with the name of each archive reflecting the original folder name. I know that tar czvf example.tar.gz example/ will compress an entire folder. However, I have not found a command to bulk archive. Is there such a command? ...

ASP.Net MVC - Is it posible to gzip before putting data in cache

Hi guys Just wondering if anyone knows whether its possible to gzip results before putting the data in the cache...Note I am wanting to use a CompressAttribute I have and the built-in OutputCacheAttribute. I'm pretty sure its possible, because I have heard Jeff A. talking about it on a couple of podcasts... I know I can sort of change...

How to know the compress rate of a jpeg image?

Is there any method to know the compress rate of a jpeg image? When I am using photoshop, I can set the compress rate when saving a jpeg image, When I am opening a jpeg image, can I read the compress rate of it? I am using freeimage, c++, however I do not find the API. Many thanks! ...

Compress/Deflate @font-face fonts

I am using the @font-face CSS property to load a special font for headings on a website, and I want Apache to send the font compressed to reduce loading time. However, the "AddOutputFilterByType" declaration in Apache 2's deflate module only accepts mime types and, as AFAIK, neither opentype nor truetype have registered mime types. So,...

GZipStream and decompression

I have code that should do the compression: FileStream fs = new FileStream("g:\\gj.txt", FileMode.Open); FileStream fd = new FileStream("g:\\gj.zip", FileMode.Create); GZipStream csStream = new GZipStream(fd, CompressionMode.Compress); byte[] compressedBuffer = new byte[500]; int offset = 0; ...

Functions to compress and uncompress array of integers

Hi all I was recently asked to complete a task for a c++ role, however as the application was decided not to be progressed any further I thought that I would post here for some feedback / advice / improvements / reminder of concepts I've forgotten. The task was: The following data is a time series of integer values int timeseries[32]...

Gracefully convert .rar to .zip using Python

I'm currently making system call to "unrar and zip" commands. It interrupts and requires me to enter password while encounter password propected archives. Is it possible to let it run and return a "unsuccessful" value to main program on any error or password prompt? Can we natively use rarfile and zipfile library to do the job without ...

Compress files while reading data from STDIN

Is it possible to compress (create a compressed archive) data while reading from stdin on Linux. ...