Re: [Freedos-user] 7zip in pure dos?
On Thu, Aug 29, 2013 at 1:47 AM, Rugxulo rugx...@gmail.com wrote: I prefer to just make a 7z archive, instead of a bz2'd tar file. The latter requires you to uncompress the tar file then extract it. What if you just want one file in the archive? And 7z archives made with max compression are comparable in size to bz2 files. ... The main problem is that everyone's needs are different, so there are many competing archiving formats, even using same LZMA compression method (although both LZMA and LZMA2 exist nowadays), e.g XZ or Lzip. By default, .7z files don't preserve *nix permissions, so they don't usually use that there, usually .tar.lz or .tar.xz : The problem with tar.whatever files is you must first uncompress the tar file, then extract what you want (and possibly then remove the uncompressed tar file.) I ran into that with Puppy Linux, where one of the Puppy forum folks had created a ginormous tar,bz2 file of libraries built for Puppy, to help resolve dependency problems when the app you installed wanted a library you didn't have. I didn't have enough space in the file system to uncompress and then extract. I converted it to a 7zip archive where I could open it and extract the libraries I needed without having to first decompress the entire tar file. I could always adjust permissions after the file was in place if that was needed. __ Dennis https://plus.google.com/u/0/105128793974319004519 -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
Hi. On Thu, 29 Aug 2013 11:34:14 -0400 dmccunney dennis.mccun...@gmail.com wrote: The problem with tar.whatever files is you must first uncompress the tar file, then extract what you want (and possibly then remove the uncompressed tar file.) Not really. If you use tar for decompression (and not 7za) it will automatically pipe the output of tar to appropriate decompression program. DJGPP ports of GNU tar should have this option too, but I think this will work much better under native Linux (actually any modern Unix with a recent version of GNU or BSD tar). Just type 'tar -xf archive.tar.xz' and you're ok. Of course, you will need to have gzip, bzip2 or xz installed (Should be installed by default in puppy. DOS ports are available from DJGGP file repository). Bojan. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
The problem with tar.whatever files is you must first uncompress the tar file, then extract what you want (and possibly then remove the uncompressed tar file.) Not really. If you use tar for decompression (and not 7za) it will automatically pipe the output of tar to appropriate decompression program. when compressing, *nobody* compresses first, then tar the very idea of 7zip is to tar first (internally), then compress. DJGPP ports of GNU tar should have this option too, but I think this will work much better under native Linux (actually any modern Unix with a recent version of GNU or BSD tar). this is a DOS mailing list. piping works different in DOS. Just type 'tar -xf archive.tar.xz' and you're ok. Of course, you will need to have gzip, bzip2 or xz installed (Should be installed by default in puppy. DOS ports are available from DJGGP file repository). Bojan. Tom -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
Let me table this discussion where my question is concerned. there is another copy of this program zipped using regular pk zip for dos and as a strict dos port. It is on the same site where I referenced a long time ago the dos ports of mplayer and other dos related desires. You will find a .ZIP of 7ZA for DOS on the same website: http://www.ausreg.com/dos_ports/index.htm Thanks for the other answers, but this option should meet my needs. Karen On Thu, 29 Aug 2013, Bojan Popovic wrote: Hi. On Thu, 29 Aug 2013 11:34:14 -0400 dmccunney dennis.mccun...@gmail.com wrote: The problem with tar.whatever files is you must first uncompress the tar file, then extract what you want (and possibly then remove the uncompressed tar file.) Not really. If you use tar for decompression (and not 7za) it will automatically pipe the output of tar to appropriate decompression program. DJGPP ports of GNU tar should have this option too, but I think this will work much better under native Linux (actually any modern Unix with a recent version of GNU or BSD tar). Just type 'tar -xf archive.tar.xz' and you're ok. Of course, you will need to have gzip, bzip2 or xz installed (Should be installed by default in puppy. DOS ports are available from DJGGP file repository). Bojan. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
Hey Tom, the very idea of 7zip is to tar first (internally), then compress. Very idea of 7zip is a specific compression algorithm, not a way the compressing utilites work. :) this is a DOS mailing list. Yep, and that was an advice that might be useful in both DOS and Linux (you mentioned Puppy Linux). Take it easy man. Didn't mean to insult you. NHF intended. Bojan. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
Hi Bojan, [Tom] the very idea of 7zip is to tar first (internally), then compress. [Bojan] Very idea of 7zip is a specific compression algorithm, not a way the compressing utilites work. :) Actually you are BOTH right. As Rugxulo already mentioned, there is a difference between archives where each file inside is compressed separately and compact archives. The latter put all files in one big block of data and compress that. The default mode of 7ZIP is to make a COMPACT archive with a SPECIFIC compression algorithm. ZIP is non-compact and otherwise comparable to TAR.GZ in strength of algorithm. So if you compress many similar files, TAR.GZ gives you the smaller archive. More modern algorithms like BZIP2 will often compress data better, but will spend much more RAM and CPU time in doing that. So TAR.BZ2 is smaller than TAR.GZ which uses GZIP. You do not usually have to make a TAR and GZIP or BZIP2 it separately with a pipeline: Both functions are usually combined behind one command, in particular in DOS where pipelines are not efficient to use. In Linux or Windows, it could happen that the modules internally communicate via pipes without you noticing: In both scenarios, you do not need to have the big, uncompressed throw all files in one TAR file lying around on your harddisk while processing a TAR.GZ (TGZ) or TAR.BZ2 (TBZ) file, luckily! However, compact archives also have disadvantages: You cannot remove files from them without recompressing the whole thing. Adding files might also work less well than for uncompact formats. Each of multiple files archived in a ZIP exists in a separate area of the ZIP, so it is easy to add or remove a file from a ZIP or unpack a single file without having to go through the whole ZIP and unpack all data to find it. As Rugxulo mentions, 7ZIP also supports less compact ways of archiving. That could mean storing information about contents in a more accessible way and compressing the big, compact blob of data in not-so-big chunks. This could allow you to unpack only the 10 MB of your 100 MB BIGSTUFF.7Z file where you have that 5 MB COOLDOC.TXT that you want to extract, thanks to some sort of table of contents in the file and thanks to having an uncompression start point every few MB. Note: I simplify here! Regards, Eric PS: Note that the 7ZIP tool HAS an option delete file from archive but you will see that this is ONLY happy when used for ZIP files. When used on 7Z or TGZ, it will work worse. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
Hi, BTW, this is just random ramblings from me, I don't claim to be any sort of expert (esp. compression programming), more like a power user (if even that). On Thu, Aug 29, 2013 at 4:23 PM, Eric Auer e.a...@jpberlin.de wrote: [Tom] the very idea of 7zip is to tar first (internally), then compress. [Bojan] Very idea of 7zip is a specific compression algorithm, not a way the compressing utilites work. :) Actually you are BOTH right. As Rugxulo already mentioned, there is a difference between archives where each file inside is compressed separately and compact archives. The latter put all files in one big block of data and compress that. The default mode of 7ZIP is to make a COMPACT archive with a SPECIFIC compression algorithm. IIRC, the default mode of 7za is -mx5 and .7z format using LZMA [or LZMA2 in newer alphas] method, which means (among other things) 16 MB dictionary, aka 2^24, aka LZMA:24 (but you can adjust that, e.g. -ms=32m -m0d=32m [LZMA:25] seems to compress slightly better, if the file is bigger than 16 MB). Bzip2 is BWT method with blocksize 100k up to 900k only. Gzip is Deflate with 32 kb dictionary. Zip has had various methods, but the default has been Deflate for a very long time. Just to clarify, .7z format can have Bzip2 or Deflate methods (or Ppmd or others). Even .ZIP format can officially support Bzip2 or even LZMA method (or others). ZIP is non-compact and otherwise comparable to TAR.GZ in strength of algorithm. Yes, hence .ZIP is slightly worse compression overall but provides some file separation which can (in limited use) make it easier to recover some files from a corrupted archive. Though normally (some of the fancier) archivers add some minimal redundancy data instead (though even that is limited and not really a good replacement for full backups). .gz seems mostly to be meant for streaming as it doesn't really support anything beyond a very minimal header. Though of course I think? you can concat several .gz files, and it will still decompress them all correctly, but that's rare (in my limited experience). Of course, only .tar saves *nix permissions info, as .ZIP was less friendly (by default) since it was DOS-oriented. Yes, you can kludge it with your own workarounds (and who knows what can optionally be saved in extra fields, better check appnote.txt), but due to that, I think, most people on *nix still don't use .ZIP very much. .gz (LZ77?) was actually just meant to be a patent-free replacement for compress .Z, which used (IIRC, now unpatented) LZW. So if you compress many similar files, TAR.GZ gives you the smaller archive. Usually but not always. 7-Zip provides its own improved Deflate, which is slightly better (tries harder, gives up less easily) than the algorithm typically used in such encoders. I'm not sure of the details (no EOS markers?). Long story short: .ZIP has bigger internal headers but it's very minor difference (overall), so it's still technically possible to use (for instance) 7-Zip to create a .ZIP that is actually smaller than a (normal) GNU gzip-produced .gz file (for the same input). More modern algorithms like BZIP2 will often compress data better, but will spend much more RAM and CPU time in doing that. So TAR.BZ2 is smaller than TAR.GZ which uses GZIP. Usually smaller. And yes, Bzip2 wasn't really ever ported (AFAIK) to anything less than 32-bit machines, not the least reason of which is the 900 kb max blocksize (versus 32 kb) and of course its slower speed overall. At risk of stating the obvious, there's always a tradeoff between compressed output size and (de)compression speed and RAM usage. At risk of sounding snobbish (unintentionally), I think Gzip (Deflate) is very weak. For very large files, it's inefficient, and thus I wouldn't recommend it directly these days. Though a 35 MB file vs. 50 MB is (at least to most modern people) not a difference worth worrying about (sadly). These days you can't do anything without a fast network connection and tons of RAM and tons of disk space. You do not usually have to make a TAR and GZIP or BZIP2 it separately with a pipeline: Both functions are usually combined behind one command, in particular in DOS where pipelines are not efficient to use. In Linux or Windows, it could happen that the modules internally communicate via pipes without you noticing: Dunno, honestly! It's complicated. But GNU tar does allegedly support extracting only certain files. Of course, I'm not a big *nix (nor tar) user, so I never use that feature. Well, DJGPP's djtar -x -o blah/readme.txt -p blah.tgz is sometimes useful (decompresses and unarchives all at once). :-) In both scenarios, you do not need to have the big, uncompressed throw all files in one TAR file lying around on your harddisk while processing a TAR.GZ (TGZ) or TAR.BZ2 (TBZ) file, luckily! We're way beyond the point of most people caring. How big is latest Linux kernel sources (with drivers)? Usually I consider that
Re: [Freedos-user] 7zip in pure dos?
Hi, On Thu, Aug 29, 2013 at 3:07 PM, Karen Lewellen klewel...@shellworld.net wrote: Let me table this discussion where my question is concerned. there is another copy of this program zipped using regular pk zip for dos and as a strict dos port. p7z458c.zip is what I see at the link you gave. Honestly, it may work, but that's a fairly older version (e.g. no LZMA2), and it's overkill if all you need is to decompress. The previous link I gave to iBiblio (also pointed to by FreeDOS Software list) is more current. At least, I can't personally think of any reason why someone would prefer 4.58 over 4.61 or 4.65 or (better) 9.04, 9.13, or (latest) 9.20.1. Again, I say, you're probably better off browsing iBiblio for what you want (presumably p7zip 9.20.1 or 7zdecode 9.22): http://ftp.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/file/7zip/ It is on the same site where I referenced a long time ago the dos ports of mplayer and other dos related desires. Probably inertia, presumably it works well enough for average use, but that old version is definitely not maintained nor recommended. The only people who (AFAIK) have bothered attempting to officially rebuild p7zip with DJGPP are (in order) Blair, Khusraw, and myself. Oops, forgot Mik, but I think even his build had some flaws. You will find a .ZIP of 7ZA for DOS on the same website: http://www.ausreg.com/dos_ports/index.htm Thanks for the other answers, but this option should meet my needs. Well, it's almost like you missed my email entirely! Oh well, whatever works is good enough, but I don't recommend older versions without an explicit reason, esp. when I have some (minor) reasons to not prefer them (a few bugs, a few lacks). -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] 7zip in pure dos?
Hi, Just my $0.02. Mostly I totally agree with Rugxulo, who evidently knows much more about stuff than he modestly pretends ;) This have not much to do with the initial OP's question, but nevertheless, archiving is an interesting topic :) - for me especially, since I had to do much work with zip/gzip/deflate/lzma for FDNPKG. On 08/30/2013 06:42 AM, Rugxulo wrote: IIRC, the default mode of 7za is -mx5 and .7z format using LZMA [or LZMA2 in newer alphas] method, which means (among other things) 16 MB dictionary, aka 2^24, aka LZMA:24 (but you can adjust that, e.g. -ms=32m -m0d=32m [LZMA:25] seems to compress slightly better, if the file is bigger than 16 MB). This is right. But bigger dictionary doesn't necessarily mean 'better'. well, sure, it means 'potentially better compression ratio', because we can seek back redundant data in wider spans, but it also means 'tremendously higher memory requirements'. This is why I don't create FDNPKG packages using LZMA (unless for pure experimentation), even though it's 5-15% smaller than DEFLATE. Trying to uncompress an LZMA file on a 16MB RAM machine is hell (or simply impossible if no virtual memory is available). Even .ZIP format can officially support Bzip2 or even LZMA method (or others). That's exactly what FDNPKG supports - LZMA-compressed files inside ZIP 'slots'. This allows using the cool ZIP structure for handling files (and extracting only these we need - eg. without SOURCES), but still benefiting from the LZMA compression ratio. .gz seems mostly to be meant for streaming as it doesn't really support anything beyond a very minimal header. Though of course I think? you can concat several .gz files, and it will still decompress them all correctly, but that's rare (in my limited experience). indeed, .gz is designed to compress only a single file. No 'directory storage' capabilities there. Still, for 'single file' compression I'd use gzip over zip anytime. It's fits better, because it provides all we need, without any additional garbage (mostly limited to filename + CRC32 + a few flags). BTW, in a future version, FDNPKG will support gz-compressed index files (provides integrity and faster refreshing time of online repositories!) Usually but not always. 7-Zip provides its own improved Deflate, which is slightly better (tries harder, gives up less easily) than the algorithm typically used in such encoders. True again. And actually, I use 7za myself to create all FDNPKG packages (as zip files, with deflate), because as you say, it provides a (small) improvement over eg. info-zip. like 5-8% or so. On a side note: some decompressors have troubles handling the 7zip 'deflated zip' files sometimes. For example kunzip crashes on some zip files created by 7za, while it doesn't crash on any other files created with 'classic' zippers. It's easy but not totally super duper simple to add or remove because you still have to disassemble and reassemble the archive if you insert or delete anything, not to mention updating the (overall) central directory structure (CDS) at the end. And potential .ZIP comments make that even slightly harder. Well, adding is easy (you just strip the directory from the end, append your file and recreate the directory). Deleting is trickier, indeed.. (need to move all data around to cover the empy hole left by the deleted file, and recalculate all data offsets in both the central directory and per-file headers...). regards, Mateusz -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user