Because I do not fully understand how compression works @ it's core, I have (possibly ridiculous) concerns that sending a pre-compressed .tar to gzip might prevent gzip from compressing as well as it's potential would allow and things of that nature.
As you stated- "tar can also compress", implies that - tar does not always compress data by itself. It does so only when used with the z option. That too not by itself, but by passing the tarred data through gzip.
Usually neither gzip nor tar can create "the absolute smallest tar.gz". There are many compression utilities that can compress to the gz format. I have written a bash script "gz99" to try gzip, 7z and advdef to get the smallest file. To use this to create the smallest possible file run:
The advdef utility from AdvanceCOMP usually gives the smallest file, but is also buggy (the gz99 utility checks that it hasn't corrupted the file before accepting the output of advdef). To use advdef directly, create file.tar.gz however you feel like. Then run:
Since you only recently learnt that tar can compress, and didn't say why you wanted the the smallest ".tar.gz" file, you may be unaware that there are more efficient formats can be used with tar files, such as xz. Generally, switching to a different format can give a vastly better improvement in compression than fiddling round with gzip options. The main disadvantage of xz is that it isn't as common as gzip so the people you send the file to might have to install a new package. It also tends to be a bit slower, particularly when compressing. If this doesn't matter to you, and you really want the smallest tar file, try:
In this trivial example, we see that to get the smallest gz we need advdef (though 7z -tgzip is almost as good and a lot less buggy). We also see that switching to xz gains us much more space than trying to squeeze the most out of the old gz format, without compression taking too long.
Compression is finding a way to express the same information using less data units. What approaches are available depends on particular compression algorithm, but in almost all of them (except for trivial and situational ones like run-length encoding) there are multiple valid solutions. The compression algorithm has to find patterns in the data that can be exploited to compress it. More sophisticated patterns may yield better results, but they will be harder to find - ie. it will take more time and/or memory.
With decompression, on the other hand, there's only one answer: you want to get the original file back. This algorithm is quite different than compression, because it's basically interpreting the compressed file as a list of instructions how to produce the original file.
Fun fact: in extreme cases decompression can be slower than compression. One situation that comes to mind is when you have an extremely compressible, but also quite large file on a storage that reads significantly slower than the CPU can compress data, and writes even slower. In this situation both the compression and decompression will be bottlenecked by the storage and reading it (for compression) will be faster than writing it (for decompression).
Compressed air has many uses in industrial applications. For example, in transport and conveying systems, for driving pneumatic drives, in control and regulation activities or for ejecting workpieces out of production moulds, as well as spraying and blowing off. But compressed air is also absolutely essential for remote-controlled valves and slide valves in process circuits, for cutting and welding devices, case packers and palletisers, and labelling machines.
The reliable supply of compressed air requires the utmost care and attention in every industry. The quality of the piping system is crucial for the trouble-free and effective use of compressed air. Not only does it need to help ensure that no impurities such as dust, oil or moisture impair the required compressed air qualities according to ISO 8573-1, but it also needs to minimise leaks, which can result in considerable economic losses.
With Viega press connector and piping systems, leaks are prevented from the very outset thanks to press connections that have been tried and tested a million times over, high-quality and durable materials, from gunmetal to copper and stainless steel and, last but not least, thanks to the reliable SC-Contur leakpath. The various Viega press connector systems with different materials and sealing elements are suitable for numerous purity classes in accordance with ISO 8573-1. This enables Viega to provide the highest possible degree of flexibility. More precise specifications can be taken care of at the Viega Service Center.
This white paper outlines the expenditure involved in generating compressed air and the impact of the piping network on operating costs. It then presents concepts for planning and operating these compressed air distribution installations, which ensure greater levels of safety and lower costs.
Every file on a computer uses a certain amount of resources when sent over the internet or stored. Keeping mind of your kilobytes (kB) and megabytes (MB) can prevent problems and produce a smoother online experience. This GreenNet guide is here to help you tell the whales from the minnows.
Computer resources do have physical limits to their capacities, even if the idea of computer resources can be scaled up indefinitely. So we really want to think of the sizes of files in a tidy, minimalist way and thereby make the most of the resources we already have. Although most people nowadays seem to have internet connections which cope easily with audio, video and high-resolution images, it is worth remembering that many people do not. If care is not taken, it is possible to produce a large media file that actually conveys no more information to people than a file a tenth or a hundredth of the size.
Software packages that consume excessive memory and disk space for their function are sometimes called "bloatware", and one could apply a similar aesthetic to media files. For instance, making transcripts available on a web site might help people to find the information they are looking for more quickly than having audio or video interviews alone. Similarly, you might want to consider whether it's easier for people, including those with visual impairments, to read the date and time of an event from a text email, or to have to open a large PDF or image file of a poster. (By the way, the Microsoft term "document" for files never really caught on. The two words are synonymous in this context.)
So how big is too big? Obviously, it depends on the context. If you are signing off on a report that is intended to go to the printers, then emailing a 10MB PDF attachment to a few people asking for final comments is completely reasonable. What would be unreasonable is then to email the finished 10MB file to your list of 2000 supporters. Instead, you could create a lower-resolution or even text-only version of the PDF, put that on your website, and email a link to the file, perhaps with a little indicator of the file size (like "[1.2 MB PDF]") next to the download link.
Although the download might take 15 seconds for some people (eg GreenNet ADSL2+ broadband offering speeds "up to" 12Mbps), 10% of household internet connections in the UK as at 2009 are still dial-up, higher in many other countries. A 10MB download on dial-up might take nearly an hour. And older broadband connections or in rural areas the download speed might be 512kbps and the transfer still takes several minutes. Even on the fastest broadband, uploading is often limited to 256kbps, so if you expect a 10MB file to be retransmitted, that is likely to be slower than expected.
A large file on its own may be no problem, but when multiplied by the size of the audience it can cause bandwidth problems that affect internet service providers and other users. Transmission also consumes a greater amount of energy, and it may result in having to upgrade hardware (up to 80% of energy over the lifetime of computer equipment is "embodied", that is, in its manufacture). GreenNet doesn't limit bandwidth, but it is subject to a "fair use" policy.
Once downloaded, larger files are harder to manipulate. Large emails can slow down access to an email inbox, and will increase the size of mailbox files on the recipients' computers. Large image files on a web page often have to be scaled by the browser software and mean navigating and scrolling through the page can be slow and erratic. (There are other things that can cause slow "rendering" of a page, such as Javascript or a complex website "back-end".)
Then there's the backup. If someone intends to keep the document or image or archives all email, it might be replicated on backup media many times over. People may also be reluctant to keep files that consume more storage than they are worth, and so delete them.
(To confuse matters, "1 KB" or "1K" is used by many computer people to mean 1024 bytes, which is a convenient number in binary, and memory or disk is often allocated by operating systems in units of 1024. To avoid this confusion with standard scientific usage of "mega-" and so on, the terms "kibibyte" (KiB), "mebibyte" (MiB), "gibibyte" (GiB) and "tebibyte" are now recommended for these non-decimal technical units. You might still feel short-changed if you bought a 4GB flash drive and it's only 3.725GiB. For simplicity this article will stick to round 1000s and kilobytes [kB].)
File or attachment size is usually easily accessible, if not already prominent. In Windows, right-clicking on any file, folder, or drive and choosing "Properties..." will show the size. In an Explorer window, you can select "Details" from the "View" menu; or in a file open or save dialogue box there is a "View" button from which you can also choose "Details". If you then click on the word "Size" at the top of the column, you can group together the largest files in a folder. In Mac OS X, you can press Command+i to show details of an individual file, or Command+Option+i to show details of all selected items in an Inspector window. The Mac equivalent of Details view is "List" view, and Command+J gives you the option to "calculate all sizes" of folders as well as files.
7fc3f7cf58