Compression formats with good support for random access within archives? [closed]

Take a look at dictzip. It is compatible with gzip and allows coarse random access. An excerpt from its man page: dictzip compresses files using the gzip(1) algorithm (LZ77) in a manner which is completely compatible with the gzip file format. An extension to the gzip file format (Extra Field, described in 2.3.1.1 of RFC … Read more

How do I extract a tar file in Java?

You can do this with the Apache Commons Compress library. You can download the 1.2 version from http://mvnrepository.com/artifact/org.apache.commons/commons-compress/1.2. Here are two methods: one that unzips a file and another one that untars it. So, for a file <fileName>tar.gz, you need to first unzip it and after that untar it. Please note that the tar archive … Read more

Zip folder in C#

This answer changes with .NET 4.5. Creating a zip file becomes incredibly easy. No third-party libraries will be required. string startPath = @”c:\example\start”; string zipPath = @”c:\example\result.zip”; string extractPath = @”c:\example\extract”; ZipFile.CreateFromDirectory(startPath, zipPath); ZipFile.ExtractToDirectory(zipPath, extractPath);

Why do people use tarballs?

bzip and gzip work on single files, not groups of files. Plain old zip (and pkzip) operate on groups of files and have the concept of the archive built-in. The *nix philosophy is one of the small tools that do specific jobs very well and can be chained together. That’s why there are two tools … Read more

Python in-memory zip library

According to the Python docs: class zipfile.ZipFile(file[, mode[, compression[, allowZip64]]]) Open a ZIP file, where file can be either a path to a file (a string) or a file-like object. So, to open the file in memory, just create a file-like object (perhaps using BytesIO). file_like_object = io.BytesIO(my_zip_data) zipfile_ob = zipfile.ZipFile(file_like_object)

Create a tar.xz in one command

Use the -J compression option for xz. And remember to man tar 🙂 tar cfJ <archive.tar.xz> <files> Edit 2015-08-10: If you’re passing the arguments to tar with dashes (ex: tar -cf as opposed to tar cf), then the -f option must come last, since it specifies the filename (thanks to @A-B-B for pointing that out!). … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)