Why is it possible to reduce the size of files. Archiving files Files and file system. Archiver is a program that allows using information compression methods to create copies of files of a smaller size - presentation. deleting files from archive


An archiver is a program that allows, using information compression methods, to create copies of files of a smaller size, as well as to combine copies of several files into one archive file. Consider the classification of archivers. 1. File archivers. 2. Compressors.


Many people have probably come across file archivers. It is enough to list their names: ZIP, RAR, ARJ. These archivers allow you to pack one or more files into a single archive file. The archive size is usually less than the total size of the original files. Compressors compress only one executable file at a time (of the EXE type) in such a way that after starting the program is self-extracting in RAM and continues its work. These are programs such as PKLITE, RAC, LZEXE. Today the leader is the UPX program.


Redundancy Editors working with text, graphics, sound and other information encode it in the most natural, but not the most economical way. Indeed, if you carefully look at any text, you will notice that such letters "a" and "o" are found in it much more often than "u" and "y". The same applies to letter combinations. In the pictures, the colors of neighboring dots are in most cases close in shade. Similarly, in any sequence of information, some combinations are much more common than others.


Redundancy All this leads to the fact that in the files storing this information, some combinations of 0 and 1 are much more common than others. In such cases, they say that the information is redundant, and it is possible to recode the contents of the file, reducing its size. For compression, it is enough to adhere to the rule: the more often the combination occurs, the shorter the combination of 0 and 1 can be used to recode it. Of course, the program must do this.


Archivers When compressing, you can reduce the file size by several times, which gives a noticeable saving in memory. For example: WinRar and WinZip Start All programs WinRAR archivers WinRAR One of the main characteristics of archivers is the degree of information compression. It can be determined by the formula:




How does the archiver work? The easiest way to archive text information is to replace typical phrases with the corresponding bytes, not one character, but a whole phrase will be encoded by a byte! The file size will be significantly reduced. Graphic files can be compressed like this. The colors of the pictures are encoded by bytes. Areas of the same color contain sequences of bytes. These are the sequences we encode with only two bytes: a byte sample and a byte - the number of samples. Thus, the file size is reduced several times.





Theme: "Archiving files".


Lesson objectives:

help students get an idea of \u200b\u200barchiving files, get acquainted with the concept of redundancy, teach how to archive and unpack files, give the basic concepts necessary for competent work on a computer.
education of information culture of students, attentiveness, accuracy, discipline, perseverance.
development of cognitive interests, computer skills, self-control, the ability to take notes.


Equipment:

board, computer, computer presentation.


Lesson plan:

I. Org. moment. (1 min)
II. Checking and updating knowledge. (5 minutes)
III. Theoretical part. (10 min)
IV. The practical part. (15 minutes)
V. Homework (2 min)
Vi. Students' questions. (5 minutes)
Vii. Lesson summary. (2 minutes)


During the classes:

I. Org. moment.

Greetings, checking those present. Explanation of the course of the lesson.


II. Checking and updating knowledge.

In order to check how you learned the topics of the previous lessons, I suggest you take a short test and evaluate your knowledge. Students take a test.


III. Theoretical part.

Editors who work with text, graphics, sound and other information encode it in the most natural, but not the most economical way.

Indeed, if you carefully look at any text, you will notice that such letters "a" and "o" are found in it much more often than "u" and "y". The same applies to letter combinations.

In the pictures, the colors of neighboring dots are in most cases close in shade. Similarly, in any sequence of information, some combinations are much more common than others.


All this leads to the fact that in the files storing this information, some combinations of 0 and 1 are much more common than others. In such cases, they say that the information is redundant, and it is possible to recode the contents of the file, reducing its size.

For compression, it is enough to adhere to the rule: the more often the combination occurs, the shorter the combination of 0 and 1 can be used to recode it. Of course, the program must do this.

Compression programs (packing files) are called archivers.

Many different archivers have been created, the most common of which are WinRar and WinZip; Windows also includes the Data Archiving utility. Choosing an archiver, you must be guided by its versatility and reliability, but of course, do not forget about the main parameters - quality and compression speed.

When compressing, you can reduce the file size by several times, which gives a noticeable saving in memory. This is especially useful when transferring files over the Internet or placing them on media that are not large, such as floppy disks.

If you try to repeat the compression procedure, then there will be no effect, since the redundancy of information is mainly eliminated during the first packing.

It should be noted that not all types of files are rationally archived in order to reduce their size. Examples include JPEG graphics, MP3 audio, and others.

The information packed by the archiver is stored in the most economical form, but it is artificially encoded, therefore, before opening the contents of the file, it is necessary to recode the file (it is customary to say: unpack, unzip).

Basic steps when working with archives:

creating a new archive;
adding files to the archive;
viewing the contents of the archive;
extracting files from the archive;
viewing the file in the archive;
deleting files from the archive.


In this lesson, we will work with one of the most popular archiving programs WinRAR, all WinRAR copyrights are exclusively owned by the author of the program, a Russian programmer - Alexander Roshal.

WinRAR can be used in two ways: in the graphical shell mode with the standard Windows interface and in the command line. To use WinRAR in shell mode, double click on the WinRAR icon - then you can use the buttons and menus to archive and extract files.


How to zip files using WinRAR shell


First of all, you need to start WinRAR. Double click or click on the WinRAR icon. You can also launch it from Start → All Programs → WinRAR → WinRAR.

When WinRAR starts, it displays a list of files and folders in the current folder in its window. You need to navigate to the folder containing the files to be archived. To change the current drive, you can use the key combination + [D], the list of drives under the toolbar, or click on the small drive icon in the lower left corner of the window. To navigate to the parent folder, use the, + keys, the small Up button below the toolbar, or double-click on the .. folder in the file list. To move to another folder, press, + or double-click on that folder.


Once you have entered the folder with the files you want, select the files and folders you want to archive. This can be done with the cursor keys or with the left mouse button while the key is pressed (as in Explorer and other Windows programs). You can also select files in the WinRAR window using the [Space] or. The [+] and [-] keys on the numeric keypad allow you to select and deselect a group of files using patterns (that is, specifying file masks with "*" and "?").

Having selected one or several files, press the "Add" button (the same action occurs when you select the "Add files to archive" command from the "Commands" menu). In the dialog box that appears, enter a name for the archive, or simply confirm the name suggested by default. Here you can also select the format of the new archive (RAR or ZIP), compression method, volume size and other archiving parameters. Click the "OK" button to create the archive.

During archiving, a statistics window is displayed. If you want to interrupt the packaging process, click the "Cancel" button. The WinRAR window can be minimized to the notification area of \u200b\u200bthe taskbar by clicking the "Background" button. At the end of the archiving, the statistics window will disappear, and the created archive will become the currently selected file.

You can also add files to an existing RAR archive using drag and drop. Select the archive in the WinRAR window and click (or double-click) its name - RAR will read the archive and show its contents. Now you can add files to the archive by simply dragging and dropping them from another program into the WinRAR window.


How to extract files using WinRAR shell


To extract files using the WinRAR shell, you first need to open the archive in WinRAR. This can be done in several ways:

double-click or click on the archive file in the Windows shell (Explorer or Desktop). If WinRAR was associated with archive file types during installation (which is done by default), then the archive will be opened in WinRAR;
double-click or click on the archive file in the WinRAR window;
drag the archive onto the WinRAR icon or window. Before doing this, make sure that no other archive is open in the WinRAR window, otherwise the dropped archive will be added to the already opened one.

When you open an archive, its contents are displayed in the WinRAR window. Select the files and folders that you want to extract. This can be done using the cursor keys or the left mouse button while the key is pressed (as in Explorer and other Windows programs). You can also select files in WinRAR using [Space] or. The [+] and [-] keys on the numeric keypad allow you to select and deselect a group of files using patterns (that is, specifying file masks with "*" and "?").

Having selected one or several files, click the "Extract to" button at the top of the WinRAR window, or press + [E], enter the desired path in the dialog that appears, and then click the "OK" button. Several additional parameters can be changed here.
During extraction, a window with statistics is displayed. If you want to abort the extraction, click the Cancel button. The WinRAR window can be minimized to the notification area of \u200b\u200bthe taskbar by clicking the "Background" button. If the extraction finishes without errors, WinRAR will return to the shell, otherwise the Diagnostic Messages Window will appear.

If you did not disable the "Embed WinRAR into shell" option when installing WinRAR, you can extract and archive files directly from the Windows shell (from Explorer or from the Desktop).


How to zip files in Explorer or from the desktop


In Explorer or on the Desktop, select the files you want to archive, right-click on the selected files and select the "Add to Archive ..." command. In the dialog box that appears, enter a name for the archive, or simply confirm the name suggested by default. Here you can also select the format of the new archive (RAR or ZIP), compression method, volume size and other archiving parameters. Click the "OK" button to create the archive. The archive will be created in the same folder where the selected files are located.

To add files to the proposed archive without additional requests, use the "Add to<имя архива>". In this case, the archive settings from the default archive profile will be applied.

Another way to archive files is by dragging the file icons onto the existing archive icon. In this case, the files will be added to this archive.


How to extract files in Explorer or from the Desktop


Right-click on the archive icon, select the "Extract files ..." command, enter the name of the folder to which you want to extract them in the dialog box that appears, and click "OK". Several additional parameters can be configured in the same dialog.

<имя папки>

Another way to extract files is to right-click one or more archives to the destination folder and then select "Extract to current folder" from the menu that appears.


Self-extracting archives


WinRAR can also create self-extracting archives. A self-extracting (SFX, from English SelF-eXtracting) archive is an archive to which an executable module is attached. This module allows you to extract files by simply running the archive like a normal program. Thus, no additional external programs are required to extract the contents of the SFX archive. However, WinRAR can work with an SFX archive in the same way as with any other, so if you do not want to run an SFX archive (for example, when you cannot guarantee that it is free of viruses), then to view or extract it content can be used by WinRAR.

SFX archives, like any other executable files, usually have the extension. EXE. SFX archives are useful when you need to transfer an archive to someone, but you are not sure that the recipient has the appropriate archiver to unpack it. You can also use SFX archives to distribute your own programs.


Archive encryption


To encrypt files, you need to specify the password before archiving - in the command line, in the menu, or directly on the "Advanced" tab of the "Archive name and parameters" dialog. To enter a password in the WinRAR shell, press + [P] (the same action occurs when you select the "Password" command in the "File" menu or when you click on the small key icon in the lower left corner of the WinRAR window). To enter a password in the "Archive name and parameters" dialog, click the "Set password" button on the "Additional" tab.

Unlike ZIP, the RAR format allows you to encrypt not only file data, but also other important areas of the archive: file names, sizes, attributes, comments and other blocks.

Do not forget to delete the entered password after it becomes unnecessary, otherwise you may accidentally pack any files with the password, absolutely not intending to do so. To remove the password, enter an empty line in the password input dialog, or close WinRAR and start it again. When the password is entered, the yellow key icon turns red. In addition, if you start archiving using a password, the title of the dialog for entering the name and parameters of the archive will blink twice.

If you entered the password directly in the "Archive name and parameters" dialog, then you do not need to cancel it yourself - the password will be valid only during one archiving operation, after which it will be reset automatically.

When extracting encrypted files, you can enter the password in advance, although this is not required. If the password was not entered before starting the extraction, and WinRAR detects an encrypted file, it will ask the user for the password.

To ensure sufficient security, use passwords that are at least 8 characters long. Do not use words of any language as a password, the best choice is a random combination of letters and numbers. Note that passwords are case sensitive. Remember that if you lose your password, you will not be able to recover encrypted files from the archive - even the author of WinRAR will not help you with this.


Questions:

Why is it possible to reduce file size?
What is archiving?
What files doesn't make sense to archive?
Why does it make sense to pack it into an archive before sending a text file by email?

III. The practical part.

To complete the assignment in this lesson, create a new folder called Back up Files in your folder and copy the files from the Back up Data folder into it.

Now let's learn how to archive files.

Run the WinRAR program. (Start → All Programs → Archivers → WinRAR → WinRAR). Open your own File backup folder in the program window and select several files.

Click the add button. Give a name to the future archive and click OK.

The files will start packing into the archive. At the same time, you can see a window with statistics of the packing process.

A new archive file Archive1 will appear in your folder. You can open the archive file and click Info to bring up the information window, where you can clearly see the degree of compression of the files.


Please note that some files are compressed well, some are practically not compressed, as they are saved in a compressed format.

For example, the statistics for the compression of a text file with a high repetition rate are:

As you can see, memory savings in this case are as much as 99%!

Now let's zip the files using the explorer.

Open your Archive folder, select several files, right-click on the selected files and select the "Add to archive ..." command. A window similar to the previous task appears. Enter the file name Archive2 and click OK.

You may have noticed, in addition to the "Add to archive ..." command, the "Add to archive<имя архива>". Selecting this command will apply the archive settings from the default archive profile.

To create an encrypted archive, after the window for adding files to the archive appears, select the Additional tab, click the Set password button and enter the password for archiving in the window that appears.

Now let's start unpacking the archives and viewing its contents.

Delete all files from the folder except the received archives.

In order to view the contents of an archive or extract files from an archive using the WinRAR shell, you first need to open the archive in WinRAR. Today we have already discussed how to do this. When you open an archive, its contents are displayed in the WinRAR window. Select the files and folders that you want to extract. Having selected one or several files, click the "Extract to" button at the top of the WinRAR window, enter the desired path in the dialog that appears, and then click the "OK" button.

You can also extract files by simply dragging and dropping them from the WinRAR shell window into your folder.

To extract files from the archive in the My Computer window without opening the WinRAR shell, right-click on the archive icon, select the "Extract files ..." command, enter the name of the folder into which you want to extract them in the dialog box that appears, and click "OK".

You can also choose the "Extract to<имя папки>"to unzip files to the suggested folder without any additional prompts, or" Extract to current folder "to extract to the current folder.

Now complete the tasks yourself:

Create 2 archives, one without encryption, the other with encryption.
Extract the files from the archive.
Extract the files from the archive prepared by the teacher from C: \\ Our lesson.
** Receive by e-mail the file with the archive, unpack the document, print the necessary information, archive the document and send it to the teacher by e-mail. Password to the archive in the letter.
Students complete the assignment.


IV. Homework

Know what archivers are and their purpose, be able to pack and unpack files in archives. Additional task: learn how to create self-extracting archives.


V. Questions from students.

Answers to students' questions.


Vi. Lesson summary.

Summing up the lesson. Grading.
In the lesson, we got acquainted with archivers and their purpose, learned how to work with an archiver.

Although nowadays storage media have reached quite large volumes, it is often necessary to reduce the file size, for example, in order to send it by e-mail.

You will need

  • There are quite a few programs for reducing file size. The most commonly used free utility is 7-zip. It is convenient in that it has the ability to work with most of the archiving algorithms of various other programs.

Instructions

  • Download and install the 7-zip program. After installing it, you need to configure it to work with all archive files. Click "Service" - "Settings". On the System tab, click the Select All button. After clicking the "OK" button, the utility will run whenever you double-click on the archive file.
  • Now that the program is installed, you can reduce the size of any files by adding them to archives. In Explorer or My Computer, right-click the files or folders that you want to reduce. A context menu will appear with the item "7-zip". If you hover your mouse over this item, you will see that you can immediately compress the file with the default settings, or you can select the "add to archive ..." item, by selecting which you can configure the archive type, compression level and other parameters.
  • Lesson objectives:

    • Consolidation of knowledge, skills and abilities of students about archiving files, get acquainted with the concept of redundancy, teach how to archive and unpack various (text and graphic) files, give the basic concepts necessary for competent work on a computer.
    • Education of information culture of students, attentiveness, accuracy, discipline, perseverance.
    • Development of cognitive interests, computer skills, self-control, the ability to take notes.

    Equipment:

    • board,
    • a computer,
    • presentation.

    Lesson plan:

    1. Org. moment. (1 min)
    2. Checking and updating knowledge. (5 minutes)
    3. The practical part. (15 minutes)
    4. The theoretical part is working with the presentation. (10 min)
    5. D / z. (2 minutes)
    6. Students' questions. (5 minutes)
    7. Lesson summary. (2 minutes)

    During the classes

    I. Org. moment.

    Greetings, checking those present. Explanation of the course of the lesson.

    II. Checking and updating knowledge.

    In order to check how you learned the topics of the previous lessons, I suggest you take a short test and evaluate your knowledge. Students take a test.

    Add:

    Safety at the lesson.

    Theoretical part.

    Editors who work with text, graphics, sound and other information encode it in the most natural, but not the most economical way.

    Indeed, if you look closely at any text, you will notice that such letters "a" and "o" are found in it much more often than "u" and "y". The same applies to letter combinations.

    In the pictures, the colors of neighboring dots are in most cases close in shade. Similarly, in any sequence of information, some combinations are much more common than others.

    All this leads to the fact that in the files storing this information, some combinations of 0 and 1 are much more common than others. In such cases, they say that the information is redundant, and it is possible to recode the contents of the file, reducing its size.

    For compression, it is enough to adhere to the rule: the more often the combination occurs, the shorter the combination of 0 and 1 it can be recoded. Of course, the program must do this.

    The programs that perform compression (packing files) are called archivers.

    Many different archivers have been created, the most common of which are WinRar and WinZip; Windows also includes the Data Archiving utility.

    Choosing an archiver, you must be guided by its versatility and reliability, but do not forget, of course, about the main parameters - quality and compression speed.

    When compressing, you can reduce the file size several times, which gives a noticeable saving in memory. This is especially useful when transferring files over the Internet or placing them on media that are not large, such as floppy disks.

    If you try to repeat the compression procedure, then there will be no effect, since the redundancy of information is mainly eliminated during the first packing.

    The information packed by the archiver is stored in the most economical form, but it is artificially encoded, therefore, before opening the contents of the file, it is necessary to convert the file (it is customary to say: unpack, unzip, restore the file).

    Basic steps when working with archives:

    • creating a new archive;
    • adding files to the archive;
    • viewing the contents of the archive;
    • extracting files from the archive;
    • viewing the file in the archive;
    • deleting files from the archive.

    In this lesson, we will work with one of the most popular archiving programs WinRAR, all WinRAR copyrights are exclusively owned by the author of the program, a Russian programmer - Alexander Roshal.

    WinRAR can be used in two ways: in the graphical shell mode with the standard Windows interface and in the command line. To use WinRAR in shell mode, double-click the WinRAR icon - then you can use the buttons and menus to archive and extract files.

    III. Laboratory work in WINDOWS "Archiving files using the WINRAR program".

    Purpose of work: to study the steps for packing files into an archive and extracting files from the archive using the Winrar program. Compare zipped text and graphics files.

    1. Find out the size of the PAC1 folder (application1) in bytes

    • Select PAC folder 1
    • Call the context menu
    • Run the Properties command
    • Read the file size in bytes and write it to the notebook Vfolders \u003d

    Pack the PAC1 folder into the pac1.rar archive

    • Select folder
    • Call the context menu
    • Run WinRara Add to archive command:
    • In the dialog box, select the rar format, through the Browse button: open the C: ARHIV folder

    (as a result, an archive file should appear in the folder)

    Find out the size of the archive file in bytes

    • Open the ARHIV folder, highlight the archive name pac1.rar
    • Call the context menu
    • Run the Properties command
    • Read the size of the archive file and write it into a notebook V archive \u003d

    Use the calculator program by downloading it according to the STARTUP PROGRAMSa STANDARDa CALCULATOR

    Do a similar work with the PAC 2 folder (Appendix 2) and find k2

    Compare the results obtained for k1 and k2, draw appropriate conclusions.

    Call the teacher to check the results of the work

    Now complete the tasks by yourself:

    Create 2 archives.

    Extract the file from the archive Wind_lection_NachUrov.rar.

    Download several zipped files from the Internet into your folder and unzip them.

    Conclusion from laboratory work: not all types of files are rationally archived in order to reduce their size. Examples include JPEG graphics, MP3 audio, and others.

    Group work:

    Questions on the topic "Archiving":

    1. Why is it possible to reduce file size?
    2. What is archiving?
    3. What files doesn't make sense to archive?
    4. Why does it make sense to pack it into an archive before sending a text file by email?
    5. Can I archive the same file multiple times?

    Additionally:

    1. Where packaging (compression) is used in life. Which material is easier to pack?
    2. Give advice to a novice PC user about archiving files. Where to buy the program and the need to pack files.

    Discussion of questions.

    Know what archivers are and their purpose, be able to pack and unpack files in archives. Additional task: learn how to create self-extracting archives. Email the zipped file to my address

    Vi. Students' questions.

    Answers to students' questions.

    Vii. Lesson summary.

    Summing up the lesson. Grading.

    In the lesson, we got acquainted with archivers and their purpose, learned how to work with an archiver.

    Thank you all for the lesson !!!

    1. 1. Dolinin AA, teacher of computer science and ICT MBOU "Urenskaya secondary school № 1" File compression. Archivers.
    2. 2. Redundancy Editors working with text, graphics, sound and other information encode it in the most natural, but not the most economical way. Indeed, if you carefully look at any text, you will notice that such letters "a" and "o" are found in it much more often than "u" and "y". The same applies to letter combinations. In the pictures, the colors of neighboring dots are in most cases close in shade. Similarly, in any sequence of information, some combinations are much more common than others.
    3. 3. Redundancy All this leads to the fact that in the files storing this information, some combinations of 0 and 1 are found much more often than others. In such cases, it is said that the information is redundant, and it is possible to recode the contents of the file, reducing its size. For compression, it is enough to adhere to the rule: the more often the combination occurs, the shorter the combination of 0 and 1 it can be recoded. Of course, the program must do this.
    4. 4. 4 Archiving and compressing files Archiving - creating backup copies (on CD, DVD). Objectives:  save data in case of a disk failure  combine a group of files into one archive  encrypt data with a password Compressing files means reducing their size. Objectives:  to reduce the space occupied by files on the disk  to reduce the amount of data for transmission over the Internet Types of compression:  lossless: a compressed file can be restored in its original form, knowing the compression algorithm ▫ texts ▫ programs ▫ data  lossy: when compressed, a part information is irretrievably lost photos (* .jpg) sound (* .mp3) video (* .mpg)
    5. 5. Why can files be compressed? Algorithm RLE (Run Length Encoding, encoding strings of identical characters, used for * .bmp pictures) AA… ABB… B 100 100 200 bytes qq.txt file qq.rle file (compressed) A 100 B 100 4 bytes Lossy compression or without ?? compression 50 times! Compression is possible if the data contains duplicate characters or strings of characters, compression "removes" this redundancy.
    6. 6. 6 Why can files be compressed? General approach:  find repeating character strings in the data  designate them with short codes (bit codes, of different lengths)  write a dictionary at the beginning of the compressed file Efficient algorithms:  Huffman algorithm  LZW (Lempel-Ziv-Welch) algorithm  PPM algorithm (WinRAR) Compressed good bad  random data  programs (* .exe)  archives (* .zip, * .rar)  compressed pictures (* .gif, * .jpg, * .png, * .tif, ...)  compressed sound (* .mp3, * .wma)  compressed video (* .mpg, * .wmv)  texts (* .txt)  documents (* .doc, * .xls)  uncompressed pictures (* .bmp)  uncompressed audio (* .wav)  uncompressed video (* .avi)
    7. 7. Archiver is a utility program designed to compress (compress) files, ie. to reduce their size and the disk space they occupy. Backup - create archived copies of a file or group of files.
    8. 8. ARJ.EXE .arj PAK.EXE .pak LHICE.EXE .ice ZOO.EXE .zoo RAR.EXE .rar ZIP.EXE .zip By expanding the archive file, you can determine which archive created the archive Archiving programs:
    9. 9. Making backup copies of documents. Creation of electronic archives; Transferring data from one PC to another. Data transmission over the network. Purposes of using archivers:
    10. 10. FUNCTIONS OF THE PROGRAMS - ARCHIVATORS: create archives and extract files from them; add, extract, or delete individual files or groups of files from the archive; create self-extracting archives; create multivolume archives; set a password for the archive; reduce the file size for sending by e-mail.
    11. 11. Special types of archives SFX-archive (English SelF eXtracting - self-extracting) is a file with the * .exe extension, which contains compressed data and an unpacking program (about 15 Kb). A multivolume archive is an archive divided into several parts. Objectives:  transfer via floppy disks  ease of downloading via the Internet WinRAR:  abc.part1.rar, abc.part2.rar,….  multivolume SFX archive: abc.part1.exe, abc.part2.rar,….  no archiver is needed to unpack  unqualified user can unpack  increase in file size  risk of virus infection
    12. 12. Self-extracting archives is an archive file that will have the extension .exe and run as a normal program. Files from such an archive can be extracted on any computer by running the program;
    13. 13. To date, WinZip WinRar archivers have won the greatest popularity and "living space"