Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


February 06, 2008

Using Bzip2 Compression with Cmd.exe and PowerShell

This useful free utility can help you transparently use compressed data at the command line or in scripts
RSS
View this exclusive article with VIP access -- click here to join |
See More Scripting Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

 Executive Summary:
Bzip2 is a free command-line tool for compressing and decompressing data that you can also use within scripts. You can write bzip2-compressed data to a new file or append the data to an existing file. If you want to output or append bzip2 data from within Windows PowerShell, you'll have to use a batch file to spawn cmd.exe from within PowerShell.

Although the graphical Windows shell has built-in support for compressing data into .zip files and then extracting it, Windows shell doesn't include tools that you can use from a command prompt or in a batch file. One of the handier free tools you can find for compressing data is the open-source bzip2 console application. However, if you're used to graphical tools such as WinZip, bzip2 isn't an intuitive tool. So, after telling you how to get bzip2, I'll demonstrate how to use it from scripts and at the command prompt. I'll also examine the tradeoffs in using bzip2. Although it offers good compression, it can be very CPU-intensive. . . .

Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...


Related Articles Hidden Option, Free Utility Can Be Real Time-Savers If You Copy File Paths Often

Migrating to PowerShell? Don't Scrap Your Existing Code Just Yet

Customize the Windows Command Shell

A Scripting Solution for Cataloging Your File System

Related Events PowerShell 101 - eLearning Series

Introduction to Identity Lifecycle Manager "2"

Power Up! With Virtualization Online Conference

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing