Does 7Zip SDK support also the container? - 7zip

I am doing a some research on 7Zip SDK and I haven't find any info about the container. Does 7Zip SDK have the LZMA algorithm only or does it support also the 7Zip container?
Zip, for example, keeps the directory structure at the end of the file, is 7Zip doing the same or something similar?

According to how to compres a Folder uses lzma sdk? in the 7zip SDK, we have two levels:
LZMA compression - (over stream or buffer);
.7z archive format - The .7z archive format does handle archive/directory features.
Found a very good 7zip C++ wrapper on https://bitbucket.org/cmcnab/sevenzip which is a very good example and works great!

Related

Omnis Studio ZIP functionality

I'm currently programming with Omnis Studio 8.x and I need your help.
I know that Omnis Studio has a specific command to compress/extract to/from its internal format but I can't find any easy method to support .zip files.
Is there an external or something better than a command-line script to manage .zip files?
Thank you for your help!
You can also look to the code examples that ship with Omnis Studio - the Java example shows how you can use java classes to work with zip files including zipping, unzipping and adding to an archive.
You could just take the object and paste it into your library.
Omnis doesn't natively support zipping and un-zipping files. You'll need to call an external utility for this.
macOS
Use $root.$runapplescript to call zip and unzip via a shell command.
Windows
On Windows, you can use Call DLL or Launch program to access external programs. The challenge with Windows is there is no consistent built-in tool for zipping and unzipping files. If you deploy to a current version of Windows 10 with PowerShell 5.1 or better, try Compress-Archive and Expand-Archive in the Microsoft.PowerShell.Archive cmdlets.
For a wider range of support, deploy 7-zip which handles .zip files.

Why does boost have different downloads for windows and linux?

This might be a stupid question, but if boost is meant to be cross-platform, why does each platform need its own version?
If I want to package a (header-only) subset of boost as a dependency with my project, do I need to include both windows and linux versions?
Line endings.
Windows IDEs typically prefer to edit all files in CR+LF (windows) line-ends.
All other platforms use LF (Unix) style line ends.
From old documentation:
.zip file
The .zip format is widely supported by both free decoders and
commercial compress/archive utilities. If you don't already have a
.zip file decoder, download one from the Info-ZIP web site, which
supplies versions for many operating systems. Text file line endings
in the .zip file are as supplied by each library developer. This
works fine for Windows, but not for Unix/Linux. The .tar.gz and
.tar.bz2 files supply Unix/Linux friendly line endings.
.tar.gz and .tar.bz2 files
The .tar.gz format is widely supported on Unix/Linux platforms. Some
Windows compress/archive utilities can read the format as well.
Because the gzip format compresses the archive as a single file rather
than compressing each file individually, the .tar.gz file is smaller
that the .zip file.
The .tar.bz2 format is becoming widely available on Unix/Linux
platforms and is built into many tar utilities. This format differs
for the .tar.gz format in the compression used, which is considerably
better and therefore creates smaller files.
Text file line endings in the .tar.gz and .tar.bz2 files have been
converted to newlines for ease of use on Unix/Linux platforms.

How do you get Firefox in a portable format for Mac, Linux and Windows?

Is it possible to get Firefox in a portable format?
The only "portable" version of FireFox I can find is on portableapps.com and it is just an installer, and from what I hear you cannot package that in your own application.
How do you get a portable version of Firefox for Windows, Mac or Linux?
For windows, just download the installer and run the Exe to completion then zip the result. This seems to work fine for use with Automated browser testing which is what I was using the portable zip for.
For Linux, you can just literally use the tar.bz2 file. It is basically portable in the default distribution already.
And for Mac you can mount the DMG file then just copy the zip contents.
One thing I also needed to do was to manually go through each file that started as executable and re-make them executable. Because the process of zipping up the files made the files non-executable.

How do I reduce the size of a Mac application bundle?

I have a 120MB bundle that when is compressed (zip) is only 30MB.
I, however, so not want to distribute a zip file. I want to distribute a bundle in a dmg.
Are there any tools I can use that will enable me to compress my bundle, but also preserve the bundle file structure so that no 'unzip' tool is needed by end-users?
Just discovered "hdiutil -format UDBZ" which creates a bzip2 compressed image.

How to create ZIP files with specific encoding

On my Linux server I have some files with accented names (test-éàïù.zip).
When I add them to a new ZIP file using 7zip command-line tool, the charset/encoding information is not saved and when opened on a Windows computer, the archive does not correctly display filenames.
I know that 7zip creates Zip V1.0 archives, not 2.0. Maybe the charset is limited to MSDos charset ?
How could I specify an encoding using 7zip or another zip tool, in order to get portable archives?
This is a superuser question, BUT...
ZIP uses a default codepage of IBM437. There is the possibility to use UTF-8, but not all zip tools and libraries support that. Some zip tools will do arbitrary code pages, even though the zip spec allows only IBM437 or UTF-8. I think WinRar is one such tool.
DotNetZip does encoding. It will do UTF-8 or an arbitrary code page. if you're writing an app, there is a .NET library. If you are running from a script, there are command line tools. Either way, DotNetZip requires .NET. You will need Mono to run it on Linux.
example for the command line:
zipit.exe Olivier.zip -cp 860 test-éàïù.txt
(to use the 860 codepage) I'm not sure that Windows Explorer correctly handles zipfiles with alternate encoding for the filenames within the zips.
See How to zip specified folders with Command Line for more info on that zipit.exe tool.
Create a ZIP file using specified code page:
7z a -mcp=<code_page> -tzip <archive_name> <file_names>...
Extract files from a ZIP file using specified code page:
7z x -mcp=<code_page> <archive_name>
I know that 7zip creates Zip V1.0 archives, not 2.0.
I couldn't work out how to use 7zip to create a zip v1.0 archive.
You can create version 1 ZIP archives using Info-Zip’s zip 1.1, which is still available (download from the FTP http://infozip.sourceforge.net/Zip.html#Downloads). You’ll need to build it from source (make sysv on a Linux system); then you’ll be able to use the newly-built zip to create old-format archives:
]# ./zip filename.zip file1 file2 file3
]# file filename.zip
]# filename.zip: Zip archive data, at least v1.0 to extract

Resources