text:
Guide to Unix/Commands/File Compression

gzip
gzip compresses files. Each single file is compressed into a single file. The compressed file consists of a GNU zip header and deflated data.

If given a file as an argument, gzip compresses the file, adds a ".gz" suffix, and deletes the original file. With no arguments, gzip compresses the standard input and writes the compressed file to standard output.

Some useful options are:

-c Write compressed file to stdout. Do not delete original file. -d Act like gunzip. -1 Performance: Use fast compression (somewhat bigger result) -9 Performance: Use best compression (somewhat slower)

Examples:

Compress the file named README. Creates README.gz and deletes README. $ gzip README

Compress the file called README. The standard output (which is the compressed file) is redirected by the shell to gzips/README.gz. Keeps README. $ gzip -c README > gzips/README.gz

Use gzip without arguments to compress README. $ < README gzip > gzips/README.gz

Links:
 * GNU Gzip, a manual, gnu.org

gunzip
gunzip uncompresses a file that was compressed with "gzip" or "compress". It tries to handle both the GNU zip format of gzip and the older Unix compress format. It does this by recognizing the extension (".gz" or ".Z" or several others) of a file.

Some useful options are:

-c Write uncompressed data to stdout. Do not delete original file.

Undo the effect of gzip README.gz by replacing the compressed version of the file with the original, uncompressed version. Creates <tt>README</tt> and deletes <tt>README.gz</tt>. $ gunzip README.gz

Write the uncompressed contents of <tt>README.gz</tt> to standard output. Pipe it into a pager for easy reading of a compressed file. $ gunzip -c README.gz | more

Another way to do that is: $ gunzip < README.gz | more

Some people name files <tt>package.tgz</tt> as short for <tt>package.tar.gz</tt>.

Links:
 * GNU Gzip, a manual, gnu.org

zcat
zcat is same thing as <tt>uncompress -c</tt>, though on many systems it is actually same as "gzcat" and <tt>gunzip -c</tt>.

Links:
 * zcat, opengroup.org
 * zcat, freebsd.org
 * GNU Gzip, a manual, gnu.org

gzcat
gzcat is same as <tt>gunzip -c</tt> which is <tt>gzip -dc</tt>.

tar
Archives without compression. Not covered by modern POSIX, which covers instead; yet, tar continues to be widely used. An archive contains one or more files or directories.

''Options to tar are confusing. Specify a mode every time.''

Modes:
 * -c create an archive (files to archive, archive from files)
 * -x extract an archive (archive to files, files from archive)
 * -t list an archive (lists the files in the archive)

Options:
 * -f FILE name of archive - must specify unless using tape drive for archive
 * -v      be verbose, list all files being archived/extracted
 * -p      preserve permissions and (if possible) user/group when extracting.
 * -z      create/extract archive with gzip/gunzip
 * -j      create/extract archive with bzip2/bunzip2
 * -J      create/extract archive with XZ

Examples:

Compress (gzip) and package (tar) the directory <tt>myfiles</tt> to create <tt>myfiles.tar.gz</tt>: $ tar -czvf myfiles.tar.gz myfiles

Uncompress (gzip) and unpack compressed package, extracting contents from <tt>myfiles</tt>: $ tar -xzvf myfiles.tar.gz

There are two different conventions concerning gzipped tarballs. One often encounters .tar.gz. The other popular choice is .tgz. Slackware packages use the latter convention.

If you have access to a tape device or other backup medium, then you can use it instead of an archive file. If the material to be archived exceeds the capacity of the backup medium, the program will prompt the user to insert a new tape or diskette.

Use the following command to back up the <tt>myfiles</tt> directory to floppies: $ tar -cvf /dev/fd0 myfiles

Restore that backup with: $ tar -xvf /dev/fd0

You can also specify standard input or output <tt>-f -</tt> instead of an archive file or device. It is possible to use copy between directories by piping two "tar" commands together. For example, suppose we have two directories, <tt>from-stuff</tt> and <tt>to-stuff</tt>

$ ls -F from-stuff/ to-stuff/

As described in Running Linux, one can mirror everything from <tt>from-stuff</tt> to <tt>to-stuff</tt> this way: $ '''tar cf -. | (cd ../to-stuff; tar xvf -)'''

Reference: Welsh, Matt, Matthias Kalle Dalheimer and Lar Kaufman (1999), Running Linux. Third edition, O'Reilly and Associates.

Links:
 * tar, The Single UNIX ® Specification, Version 2, 1997, opengroup.org
 * C.4 Utilities, opengroup.org - indicates tar as removed
 * tar man page, man.cat-v.org
 * tar, freebsd.org
 * GNU tar, a manual, gnu.org
 * , wikipedia.org

cpio
cpio is used for creating archives. When creating an archive, a list of files is fed to its standard-input (rather than specifying the files on the commandline). This file-list is typically created by ls, find or locate and then piped directly to cpio; but it can also first be filtered/edited with commands like *grep, sed, sort and others. A (pre-edited) list stored as a file can also be used, by using cat to feed the pipeline or simply by redirecting the shell's standard-input (<).

cpio works in one of three modes:
 * cpio -o - Copy-Out mode: Files are copied out from the filesystem to create an archive. Usually the archive is created by simply using the shell to redirect cpio's output to a file (with >).
 * cpio -i - Copy-In mode: Files from an existing archive are restored/extracted, and copied back in to the filesystem.
 * cpio -p - Pass-Through mode: cpio is used to copy files from one location in the directory-tree to another, without an actual archiving being made.

In addition comes:
 * cpio -t - List archive: The content of an archive is listed without extracting it.
 * cpio -tv - Here the verbose-option (-v) will cause a "long listing", with permissions, size and ownership.

Adding the verbose-option (-v) in Copy-In, Copy-Out and Pass-Through mode, will cause cpio to list the files as they're extracted/archived/copied.

Using ls to create an archive (verbosely) with all doc-files in the current directory: $ ls *.doc | cpio -ov > word-docs.cpio

Using find to create an archive with all txt-files in and below the current directory: $ '''find. -name "*.txt" | cpio -ov > text-files.cpio'''

Using find and fgrep to create an archive of just the txt-files containing the word wiki (any case): $ '''find. -name "*.txt" -exec fgrep -l -i "wiki" {} \; | cpio -ov > wiki.cpio''' For fgrep the option -i means "ignore case", and the option -l cause it to just list the filenames of files matching the pattern.

Using an existing list of files: $ cpio -ov < file-list.txt > archive.cpio

Using several list of files, but first after sort-ing and uniq-ing them: $ cat files1 files2 files3 | sort | uniq | cpio -ov > myfiles.cpio

To add more files, use the append-option (-A). Specify the file with the file-option (-F): $ cat files4 | cpio -ovA -F myfiles.cpio

To extract files (being verbose): $ cpio -iv < myfiles.cpio

cpio doesn't create directories by default, so use the option -d to make it.

To extract files, while creating directories as needed: $ cpio -ivd < myfiles.cpio

To list the content of an archive, short listing: $ cpio -t < myfiles.cpio

To list the content of an archive, long listing: $ cpio -tv < myfiles.cpio

Links:
 * cpio, The Single ... Specification, Version 2, 1997, opengroup.org
 * C.4 Utilities, opengroup.org
 * cpio man page, man.cat-v.org
 * GNU CPIO, a manual, gnu.org

pax
Provides archiving services like tar but with different command-line syntax; provides more archive formats than tar. Because pax does not assume the tape device, some prefer it to tar.

Archive formats to be supported at minimum per POSIX are cpio, pax, and ustar. The FreeBSD pax tool does not support the pax archive format; the pax format is supported by AIX and Solaris.

Although covered by POSIX, pax is usually not installed per default in Linux distributions; tar sees continued use instead. Even when installed as an additional package, pax for Linux does not support the POSIX-required pax archive format.

Links:
 * pax, opengroup.org
 * pax in The Single UNIX ® Specification, Version 2, 1997, opengroup.org
 * pax, freebsd.org
 * pax(1p), man7.org - from POSIX Programmer's Manual, not from actual Linux
 * pax, opensource.apple.com
 * pax for AIX 7.3, ibm.com
 * pax for Solaris 11.1, docs.oracle.com
 * pax, heirloom.sourceforge.net
 * paxutils, savannah.gnu.org - has no published releases; there is git repository
 * , wikipedia.org
 * Package: pax, packages.ubuntu.com
 * Package: pax, packages.debian.org
 * pax, pkgs.org
 * Pax-20201030, linuxfromscratch.org
 * pax lack of support for "pax" format fails LSB, 2009, bugs.launchpad.net/paxmirabilis
 * pax is not compliant with the latest version of POSIX yet, 2014, bugs.launchpad.net/ubuntu
 * mircpio in MirBSD, github.com

bzip2
bzip2 and bunzip2 are similar to "gzip"/"gunzip" but with a different compression method. Compression is generally better but slower than "gzip". Decompression is somewhat fast.

An option of -1 through -9 can be used to specify how good bzip2 should compress. The number tells how large "chunks" in steps of 100kB should compress at a time, so using <tt>bzip2 -5 foo.bar</tt> will compress foo.bar in chunks of 500kB each. Generally, larger chunks means better compression (but probably slower). Only undamaged "chunks" can be recovered with <tt>bzip2recover</tt> from a damaged bzip2-file, so if you've compressed 900kB chunks, you'll loose 900kB of your file if one chunk is damaged - but only 100kB if you used 100kB chunks (<tt>bzip2 -1</tt>). By default bzip2 uses 900kB chunks for best possible compression.

bzcat is same as <tt>bunzip2 -c</tt> which is <tt>bzip2 -dc</tt>.

Links:
 * bzip2, freebsd.org

zip
Adds files to a compressed zip archive. You can extract files from a zip archive using unzip. The zip format is a common archiving file format used on Microsoft Windows PCs. A zip archive has members compressed individually; imagine gzip of every file before tar-ing them, but with a different format.

Like for gzip the quality of the compression can be specified by giving a number between 1 and 9 as an option (e.g. <tt>zip -5</tt>). 1 is quickest, but gives a low-quality compression. 9 gives the highest quality of compression, but is slow. In addition 0 can be used (i.e. <tt>zip -0</tt>) to specify that the files should just be "stored" and not compressed (a compression of 0%), thus making it possible to use zip to make uncompressed archives.

Note that a zip-archive contains individualy compressed files collected into a single file. This is the opposite of how it's done for most other compressed Unix-archives (e.g. <tt>tar.gz</tt> and <tt>tar.bz2</tt>), where the files/directories are first collected into a single file -- an archive (e.g. cpio or tar), and then this single file is compressed (e.g. using gzip or bzip2).

Examples:
 * zip archive.zip file.txt
 * Adds the file to the archive. If the archive does not exist, creates it.
 * zip archive file.txt
 * As above; adds the .zip extension automatically, creating archive.zip.
 * cat filelist.txt | zip archive.zip -@
 * Adds the files listed in filelist.txt to the archive.
 * zip -0 archive.zip file.txt
 * Adds the file to the archive, making no compression, merely storing the file.
 * zip archive.zip file1.txt file2.txt file3.txt
 * Adds multiple files to the archive.
 * zip -r archive.zip.
 * Adds all files in the current directory and the sub-directories into the archive except for the archive itself, preserving the directory nesting information.
 * zip -r -j archive.zip.
 * As above, but without the directory nesting information. Thus, each file is tracked under its file name only in the archive.
 * zip -h2
 * Outputs extended help, longer than the -h one.

Links:
 * zip, freebsd.org
 * Info-ZIP, wikipedia.org
 * Zip (file format), wikipedia.org

unzip
Extracts files from zip archives. See also zip. You can get a Windows version of Info-ZIP unzip from GnuWin32. FreeBSD appears to be using a custom version of unzip, distinct from Info-ZIP yet largely compatible with it.

Examples:
 * unzip archive.zip
 * Extracts all files from the archive.
 * unzip archive.zip file.txt
 * Extracts a particular file from the archive.
 * unzip -l archive.zip
 * Lists files contained in the archive without extracting them.

Links:
 * unzip, freebsd.org
 * infozip, sourceforge.net
 * unzip.c as part of FreeBSD, github.com

compress
compress is a compressed file format that is popular on UNIX systems. Files compressed with compress will have a ".Z" extension appended to its name.

Links:
 * compress, opengroup.org
 * compress man page, man.cat-v.org
 * compress

uncompress
Extracts files from an archive created by compress.

Links:
 * uncompress, opengroup.org
 * compress, uncompress, zcat, man.cat-v.org
 * uncompress, freebsd.org
 * compress

unar
Extracts files from a variety of compression formats, including 7z (7-zip) and RAR. License: LGPL. A companion utility to show archive file listing is lsar.

Links:
 * unar, freebsd.org
 * unar, directory.fsf.org
 * unar, packages.debian.org
 * The Unarchiver, wikipedia.org

shar
A legacy tool and a file format to create self-extracting file archives, not covered by POSIX. The self-extracting archives are shell scripts.

Links:
 * shar, freebsd.org
 * GNU shar utilities, gnu.org
 * shar, manpages.ubuntu.com
 * , wikipedia.org

title: Guide to Unix/Commands/File Compression


text:
Ada Programming/Types/array

An array is a collection of elements which can be accessed by one or more index values. In Ada any definite type is allowed as element and any discrete type, i.e. Range, Modular or Enumeration, can be used as an index.

Declaring arrays
Ada's arrays are quite powerful and so there are quite a few syntax variations, which are presented below.

Basic syntax
The basic form of an Ada array is:

(Index_Range) Element_Type

where Index_Range is a range of values within a discrete index type, and Element_Type is a definite subtype. The array consists of one element of "Element_Type" for each possible value in the given range. If you for example want to count how often a specific letter appears inside a text, you could use:

Character_Counter  (Character)  Natural;

Very often, the index does not have semantic contents by itself, it is just used a means to identify elements for instance in a list. Thus, as a general advice, do not use negative indices in these cases. It is also a good style when using numeric indices, to define them starting in 1 instead of 0, since it is more intuitive for humans and avoids off-by-one errors.

There are, however, cases, where negative indices make sense. So use indices adapted to the problem at hand. Imagine you are a chemist doing some experiments depending on the temperature:

Temperature  -10 .. +40;   Experiment   (Temperature )  Something;

With known subrange
Often you don't need an array of all possible values of the index type. In this case you can your index type to the actually needed range.

Index_Sub_Type Index_Type  First .. Last (Index_Sub_Type) Element_Type

Since this may involve a lot of typing and you may also run out of useful names for new subtypes, the array declaration allows for a shortcut:

(Index_Type First .. Last)  Element_Type

Since First and Last are expressions of Index_Type, a simpler form of the above is:

(First .. Last) Element_Type

Note that if First and Last are numeric literals, this implies the index type Integer.

If in the example above the character counter should only count upper case characters and discard all other characters, you can use the following array type:

Character_Counter  (Character  'A' .. 'Z')  Natural;

With unknown subrange
Sometimes the range actually needed is not known until runtime or you need objects of different lengths. In some languages you would resort to pointers to element types. Not with Ada. Here we have the box '<>', which allows us to declare indefinite arrays:

(Index_Type <>)  Element_Type;

When you declare objects of such a type, the bounds must of course be given and the object is constrained to them.

The predefined type String is such a type. It is defined as

String  (Positive  <>)  Character;

You define objects of such an unconstrained type in several ways (the extrapolation to other arrays than String should be obvious):

Text : String (10 .. 20); Input: String := Read_from_some_file;

(These declarations additionally define anonymous subtypes of String.) In the first example, the range of indices is explicitly given. In the second example, the range is implicitly defined from the initial expression, which here could be via a function reading data from some file. Both objects are constrained to their ranges, i.e. they cannot grow nor shrink.

With aliased elements
If you come from C/C++, you are probably used to the fact that every element of an array has an address. The C/C++ standards actually demand that.

In Ada, this is not true. Consider the following array:

Day_Of_Month  1 .. 31;  Day_Has_Appointment   (Day_Of_Month)  Boolean; (Day_Has_Appointment);

Since we have packed the array, the compiler will use as little storage as possible. And in most cases this will mean that 8 boolean values will fit into one byte.

So Ada knows about arrays where more than one element shares one address. So what if you need to address each single element. Just not using pragma Pack is not enough. If the CPU has very fast bit access, the compiler might pack the array without being told. You need to tell the compiler that you need to address each element via an access.

Day_Of_Month  1 .. 31;  Day_Has_Appointment   (Day_Of_Month)   Boolean;

Arrays with more than one dimension
Arrays can have more than one index. Consider the following 2-dimensional array:

Character_Display Positive  Positive    Character

This type permits declaring rectangular arrays of characters. Example:

Magic_Square Character_Display S A T O R      A R E P O       T E N E T       O P E R A       R O T A S

Or, stating some index values explicitly,

Magic_Square Character_Display1  5 1  5 1 S A T O R       2  A R E P O       3  T E N E T       4  O P E R A       5  R O T A S

The index values of the second dimension, those indexing the characters in each row, are in 1 5 here. By choosing a different second range, we could change these to be in 11 15:

Magic_Square Character_Display1  5 11  15 1 S A T O R        ...

By adding more dimensions to an array type, we could have squares, cubes (or « bricks »), etc., of homogenous data items.

Finally, an array of characters is a string (see Ada Programming/Strings). Therefore, Magic_Square may simply be declared like this:

Magic_Square Character_Display "SATOR" "AREPO" "TENET" "OPERA" "ROTAS"

Assignment
When accessing elements, the index is specified in parentheses. It is also possible to access slices in this way:

Vector_A (1 .. 3) := Vector_B (3 .. 5);

Note that the index range slides in this example: After the assignment, Vector_A (1) = Vector_B (3) and similarly for the other indices.

Also note that slice assignments are done in one go, not in a loop character by character, so that assignments with overlapping ranges work as expected:

Name: String (1 .. 13) := "Lady Ada    "; Name (6 .. 13) := Name (1 .. 8);

The result is "Lady Lady Ada" (and not "Lady Lady Lad").

Slicing
As has been shown above, in slice assignments index ranges slide. Also subtype conversions make index ranges slide:

Str_1_8 String (1 .. 8);

The result of Str_1_8 (Name (6 .. 13)) has the new bounds 1 and 8 and contents "Lady Ada" and is not a copy. This is the best way to change the bounds of an array or of parts thereof.

Concatenate
The operator "&" can be used to concatenate arrays:

Name := First_Name & ' ' & Last_Name;

In both cases, if the resulting array does not fit in the destination array, Constraint_Error is raised.

If you try to access an existing element by indexing outside the array bounds, Constraint_Error is raised (unless checks are suppressed).

Array Attributes
There are four Attributes which are important for arrays: ', ', ' and '. Lets look at them with an example. Say we have the following three strings:

Hello_World :  String := "Hello World!"; World       :  String := Hello_World (7 .. 11); Empty_String : String := "";

Then the four attributes will have the following values:

The example was chosen to show a few common beginner's mistakes:

 * 1) The assumption that strings begin with the index value 1 is wrong (cf. World'First = 7 on the second line).
 * 2) The assumption (which follows from the first one) that X'Length = X'Last is wrong.
 * 3) The assumption that X'Last >= X'First; this is not true for empty strings.

The index subtype of predefined type String is Positive, therefore excluding 0 or -17 etc. from the set of possible index values, by subtype constraint (of Positive). Also, 'A' or 2.17e+4 are excluded, since they are not of type Positive.

The attribute ' is a little special as it does not return a discrete value but an abstract description of the array. One might wonder what it is good for. The most common use is in the for loop on arrays. When looping over all elements of an array, you need not know the actual index range; by using the attribute, one of the most frequent errors, accessing elements out of the index range, can never occur:

I World' ... World (I)... ;

' can also be used in declaring a name for the index subtype:

Hello_World_Index Integer  Hello_World'Range;

The attribute can be convenient when programming index checks:

K World WorldK Substitute

Empty or Null Arrays
As you have seen in the section above, Ada allows for empty arrays. Any array whose last index value is lower than the first index value is empty. And — of course — you can have empty arrays of all sorts, not just String:

Some_Array  (Positive range <>)  Boolean; Empty_Some_Array : Some_Array (1 .. 0) := ( => False); Also_Empty: Some_Array (42 .. 10);

Note: If you give an initial expression to an empty array (which is a must for a constant), the expression in the aggregate will of course not be evaluated since there are no elements actually stored.

Wikibook

 * Ada Programming
 * Ada Programming/Types
 * Data Structures
 * Data Structures/Arrays

Ada Quality and Style Guide

|Array

Programación en Ada/Tipos/Arrays

source: wikimedia

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Ada Programming/Types/array


text:
File:NGC7510 Open Cluster.png

Summary
Taken using home-made wide field 400mm telescope on HEQ5 mount using ASI1600-MM-pro camera and Baader narrowband filters.This is a small crop from a much larger image.
 * Other information:

title: File:NGC7510 Open Cluster.png


text:
Kansas's 26th Senate district

Kansas's 26th Senate district is one of 40 districts in the Kansas Senate. It has been represented by Republican Dan Kerschen since 2013, following his primary defeat of fellow Republican Dick Kelsey.

Geography
District 26 covers the southern and southwestern suburbs of Wichita in Sedgwick County, including some of Wichita proper as well as Haysville, Mulvane, Cheney, Garden Plain, and parts of Derby, Clearwater, and Goddard.

The district is located entirely within Kansas's 4th congressional district, and overlaps with the 81st, 82nd, 93rd, 94th, 97th, 98th, and 101st districts of the Kansas House of Representatives.

title: Kansas's 26th Senate district


text:
nonidentical

Adjective

 * 1) Not identical; different in some respect.

Noun

 * 1) A twin other than an identical twin.

title: nonidentical


text:
Wikipedia:WikiProject Spam/LinkReports/stevennewman.com

Links

 * stevennewman.com resolves to [//<IP_ADDRESS> <IP_ADDRESS>]
 * Link is not on the blacklist.
 * Link is not on the domainredlist.
 * Link is not on the Monitorlist.
 * None of the mentioned users is on the blacklist.
 * Link is not on the whitelist.
 * Link is not on the monitor list.
 * None of the mentioned users is on the blacklist.
 * Link is not on the whitelist.
 * Link is not on the monitor list.

Additions

 * Displayed all 2 additions.


text:
Tanja

Proper noun

 * 1) . Popular in the 1970s and the 1980s

Usage notes
Matronymics
 * son of Tanja: Tanjuson
 * daughter of Tanja: Tanjudóttir

Etymology
From. Cognate to 🇨🇬.

Usage notes

 * Popular in Finland in the 1970s and the 1980s.

Etymology
From, diminutive of , whence less common 🇨🇬. Compare 🇨🇬,,.

Etymology
.

title: Tanja


text:
Music media in Italy

There are an abundance of paper, on-line and broadcast media in Italy that cover all genres of music.

Print media and/or on-line magazines
Many Italian magazines about music now maintain a presence on the Internet with on-line versions of their Italian music.

Broadcast media
Nationwide, the state-run broadcasting network, RAI (Radio audizioni italiane), provides three TV channels and three AM or FM radio channels. There are also three private TV networks, run by the Mediaset company. All provide live or recorded music many hours per week. Many large cities in Italy have local TV stations, as well, which may provide live folk or dialect music often of interest only to the immediate area. Additionally, there are many hundreds of private FM radio stations broadcasting in Italy, with much of the programming devoted to music.

title: Music media in Italy


text:
User:Charanjaitu

Hi everyone,

I am here to give and get knowledge. I update whatever knowledge I have. I try to correct the grammatical and spelling mistakes wherever I find them.

Thanks, Charandeep S.

title: User:Charanjaitu