» [Lesson #19 Archiving files]

Topic: "File archiving".

Lesson Objectives:

    to help students gain an understanding of file archiving, to get acquainted with the concept of redundancy, to teach how to archive and unpack files, to 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, ability to take notes.

Equipment:

board, computer, computer presentation.

Lesson plan:

  1. Org. moment. (1 minute)
  2. Checking and updating knowledge. (5 minutes)
  3. Theoretical part. (10 min)
  4. Practical part. (15 minutes)
  5. D / s (2 min)
  6. Questions from students. (5 minutes)
  7. Summary of the lesson. (2 minutes)

During the classes:

I. Org. moment.

Greeting, checking those present. Explanation of the lesson.

II. Checking and updating knowledge.

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

III. Theoretical part.

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 can be attributed to combinations of letters.

In the figures, the colors of neighboring dots are in most cases similar in hue. Likewise, in any sequence of information, some combinations are much more common than others.

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

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

Programs that perform compression (packing files) are called archivers.

Many different archivers have been created, the most common of them are WinRar and WinZip, Windows also includes the Data Archiving utility. When choosing an archiver, it is necessary to 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 savings in memory. This is especially valuable when sending files over the Internet or placing them on media that is small in size, 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 it is not rational to archive all types of files in order to reduce their size. An example is the drawing in JPEG format, 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, restore the file).

Basic steps for working with archives:

    creating a new archive;

    adding files to the archive;

    viewing the contents of the archive;

    extraction of files from the archive;

    viewing a file in an archive;

    deleting files from the archive.

In this lesson, we will work with one of the most popular WinRAR archiving programs, 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 GUI mode with standard Windows interface and in command line. To use WinRAR in shell mode, double-click on the WinRAR icon - after that, you can use the buttons and menus to archive and extract files.

How to archive files using the WinRAR shell

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

When you start WinRAR, it shows in its window a list of files and folders in the current folder. 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 go to the parent folder, use the , + keys, the small "Up" button below the toolbar, or double-click the ".." folder in the file list. To move to another folder, press , + or double-click the folder.

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

With one or more files selected, 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 accept the default name. Here you can also select the format of the new archive (RAR or ZIP), compression method, volume size, and other archiving options. Click the "OK" button to create the archive.

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

You can also add files to an existing RAR archive using the drag and drop method. Select an archive in the WinRAR window and click (or double-click) on its name - RAR will read the archive and display 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 the 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 (in Explorer or on the desktop). If WinRAR was associated with archive file types during installation (which is the 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 dragged archive will be added to the already open one.

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

With one or more files selected, 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. Here you can change some additional parameters.

During extraction, a statistics window is displayed. If you want to abort the extraction, click the "Cancel" button. The WinRAR window can be minimized to the taskbar notification area by clicking the "Background" button. If the extraction completes without errors, WinRAR will return to the shell, otherwise the Diagnostic Messages Window will appear.

If during installation of WinRAR you didn't turn off the "Embed WinRAR into shell" option, then you can extract and archive files directly from the Windows shell (from Explorer or from the Desktop).

How to zip files in File 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 accept the default name. Here you can also select the format of the new archive (RAR or ZIP), compression method, volume size, and other archiving options. Click the "OK" button to create the archive. The archive will be created in the same folder as the selected files.

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

Another way to zip files is to drag the file icons onto the icon of an existing archive. In this case, the files will be added to this archive.

How to extract files in File Explorer or Desktop

Click right click click on the archive icon, select the "Extract Files..." command, enter the name of the folder where you want to extract them in the dialog box that appears, and click the "OK" button. In the same dialog, you can configure several additional options.

<имя папки>

Another way to extract files is to drag one or more archives with the right mouse button to the destination folder, and then select the "Extract to current folder" command from the menu that appears.

Self-extracting archives

WinRAR can also create self-extracting archives. A self-extracting (SFX, from 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 as regular program. Thus, no additional external programs are required to extract the contents of an SFX archive. However, WinRAR can work with an SFX archive just like any other, so if you don't want to run an SFX archive (for example, when you can't guarantee it's free of viruses), then to view or extract it content you can use WinRAR.

SFX archives, like any other executable files, usually have an .EXE extension. SFX archives are useful in cases where you need to send 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 must specify a password before starting archiving - on 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 from 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 "Name and parameters of the archive" dialog, you must click the "Set password" button on the "Advanced" 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.

Don't forget to delete the entered password after it is no longer needed, otherwise you may accidentally pack some password files without intending to do so. To remove the password, enter an empty string in the password 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 a password in advance, although this is not required. If a password was not entered before starting the extraction, and WinRAR finds an encrypted file, it will ask the user for the password.

For a reasonable level of 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 restore encrypted files from the archive - even the author of WinRAR will not help you with this.

    Why is it possible to reduce file size?

    What is archiving?

    What files do not make sense to archive?

    Why before shipment text file on e-mail does it make sense to pre-pack it into an archive?

III. Practical part.

To complete the task of this lesson, create a new folder "Archive files" in your folder and copy the files from the folder C:\Our lesson to it.

Now let's learn how to archive files.

Launch the WinRAR program. (Start→All Programs→Archivers→ WinRAR→ WinRAR). Open your File Archive 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 to be archived. At the same time, you can see a window with the statistics of the packaging process.

In your folder will appear new file archive Archive1. You can open the archive file and clicking Info will bring up the information window, where you can clearly see the degree of file compression.

Please note that some files compress well, some hardly compress, as they are saved in compressed format.

For example, here are the compression statistics for a text file with a large number of repetitions:

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

Now let's archive 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<archive name>". Selecting this command will apply the backup settings from the default backup profile.

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

Now let's unpack the archives and view its contents.

Delete all files from the folder except for 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. We have already talked about how to do this today. When an archive is opened, its contents are displayed in the WinRAR window. Select the files and folders you want to extract. With one or more files selected, 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 the files simply by dragging them from the WinRAR shell window to your folder.

To extract files from an 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 where you want to extract them in the dialog box that appears, and click the "OK" button.

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

Now do 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 the zip file by email, unpack the document, type in the required information, zip the document and email it to your teacher. Password to the archive in the letter.

Students complete the task.

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. Students' questions.

Answers to students' questions.

VI. Summary of the lesson.

Summing up the lesson. Grading.

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

  • Editors working with text, graphics, sound and other information, encode her 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 can be attributed to combinations of letters.

  • In the figures, the colors of neighboring dots are in most cases similar in hue. Likewise, in any sequence of information, some combinations are much more common than others.


Redundancy

  • All this leads to the fact that in the files that store this information, some combinations from 0 and 1 are much more common, than others. In such cases it is said that information has redundancy , and it is possible to recode the contents of the file, reducing its size.

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


Archivers

  • Programs that compress files (compress files) are called archivers.

  • When compressing, you can reduce the file size by several times, which gives a noticeable savings in memory.

  • For example: WinRar and WinZip

  • Start→All Programs→Archivers→ WinRAR→ WinRAR


Basic steps for working with archives:

  • creating a new archive;

  • adding files to the archive;

  • viewing the contents of the archive;

  • extraction of files from the archive;

  • viewing a file in an archive;

  • deleting files from the archive.


WinRAR shell



Archiving with the WinRAR Shell


Archiving with the WinRAR Shell


Archive Information


Unpacking files


Unpacking files


Questions:

  • Why is it possible to reduce file size?

  • What is archiving?

  • What files do not make sense to archive?

  • Why does it make sense to pack it into an archive before sending a text file by e-mail?


Although storage media has now 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 the size of files. From free utilities The most commonly used program is 7-zip. It is convenient in that it has the ability to work with most of the archiving algorithms of various other programs.

Instruction

  • 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 pressing the "OK" button, the utility will be launched 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 File Explorer or My Computer, right-click on the files or folders you want to reduce the size of. will appear context menu, which has the item "7-zip". If you hover over this item, you will see that you can immediately compress the file with 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.
    1. 1. Dolinin A.A., teacher of computer science and ICT, MBOU "Urenskaya secondary school No. 1" File compression. Archivers.
    2. 2. Redundancy Editors working with textual, graphic, 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 can be attributed to combinations of letters. In the figures, the colors of neighboring dots are in most cases similar in hue. Likewise, 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 that store this information, some combinations of 0 and 1 are much more common than others. In such cases, the information is said to be redundant, and it is possible to recode the contents of the file, reducing its size. For compression, it is enough to follow the rule: the more often a combination occurs, the shorter the combination of 0 and 1 can be recoded. Of course, the program must do this.
    4. 4. 4 Archiving and compressing files Archiving - creating backups(on CD, DVD). Goals:  save data in case of a disk failure  combine a group of files into one archive  encrypt data with a password Compressing files is a reduction in their size. Goals:  reduce the space that files take up on the disk  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 compressing part information is irretrievably lost photos (*.jpg) sound (*.mp3) video (*.mpg)
    5. 5. Why can files be compressed? RLE algorithm (Run Length Encoding, coding of chains of identical characters, used for *.bmp images) A ​​A … A B B … B 100 100 200 bytes File qq.txt File qq.rle (compressed) A 100 B 100 4 bytes Lossy compression or without?? compression by 50 times! Compression is possible if there are repeated characters or strings of characters in the data, compression "eliminates" this redundancy.
    6. 6.6 Why can files be compressed? General approach:  find repeating strings of characters in the data  label them short codes(bitwise, different lengths)  write a dictionary to the beginning of the compressed file Efficient algorithms:  Huffman algorithm  LZW algorithm (Lempela-Ziva-Welch)  PPM algorithm (WinRAR) *.zip, *.rar)  compressed pictures (*.gif, *.jpg, *.png, *.tif, …)  compressed audio (*.mp3, *.wma)  compressed video (*.mpg, *.wmv)  texts (*.txt)  documents (*.doc, *.xls)  uncompressed pictures (*.bmp)  uncompressed audio (*.wav)  uncompressed video (*.avi)
    7. 7. An archiver is a utility program designed for compressing (compressing) files, i.e. to reduce their size and their disk space. Backup - creating 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 the extension of the archive file, you can determine which archiver created the archive Archiver programs:
    9. 9. Creation of 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 PROGRAMS - ARCHIVERS: create archives and extract files from them; add, extract, or remove individual files or groups of files from the archive; create self-extracting archives; create multi-volume archives; set a password for the archive; reduce the file size for sending by e-mail.
    11. 11. Special types of archives SFX-archive (eng. SelF eXtracting - self-extracting) is a file with the *.exe extension, which contains compressed data and an unpacking program (about 15 Kb). A multi-volume archive is an archive divided into several parts. Goals:  transfer via floppy disks  convenience of downloading via Internet WinRAR:  abc.part1.rar, abc.part2.rar, ….  multivolume SFX archive: abc.part1.exe, abc.part2.rar, ….  unpacking does not require an archiver  unskilled user can unpack  increase in file size  risk of virus infection
    12. 12. Self-extracting archives - this is an archive file that will have the extension .exe and run like 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"

    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 the information culture of students, attentiveness, accuracy, discipline, perseverance.
    • Development of cognitive interests, computer skills, self-control, ability to take notes.

    Equipment:

    • board,
    • a computer,
    • presentation.

    Lesson plan:

    1. Org. moment. (1 minute)
    2. Checking and updating knowledge. (5 minutes)
    3. Practical part. (15 minutes)
    4. The theoretical part - work with the presentation. (10 min)
    5. D / s. (2 minutes)
    6. Questions from students. (5 minutes)
    7. Summary of the lesson. (2 minutes)

    During the classes

    I. Org. moment.

    Greeting, checking those present. Explanation of the lesson.

    II. Checking and updating knowledge.

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

    Add:

    Safety in the classroom.

    Theoretical part.

    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 can be attributed to combinations of letters.

    In the figures, the colors of neighboring dots are in most cases similar in hue. Likewise, in any sequence of information, some combinations are much more common than others.

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

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

    Programs that perform compression (packing files) are called archivers.

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

    When choosing an archiver, it is necessary to 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 savings in memory. This is especially valuable when sending files over the Internet or placing them on media that is small in size, 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 recode the file (it is customary to say: unpack, unzip, restore the file).

    Basic steps for working with archives:

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

    In this lesson, we will work with one of the most popular WinRAR archiving programs, 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 graphical shell mode with a standard Windows interface and on the command line. To use WinRAR in shell mode, double-click on the WinRAR icon - after that, you can use the buttons and menus to archive and extract files.

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

    The purpose of the work: to study the steps for packing files into an archive and extracting files from an archive using Winrar programs. Compare archived text and image files.

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

    • Select folder PAC 1
    • Call context menu
    • Execute Properties command
    • Read file size in bytes and write it to notebook Vfolders=

    Pack PAC1 folder into pac1.rar archive

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

    (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, select the archive name pac1.rar
    • Call context menu
    • Execute Properties command
    • Read the size of the archive file and write it in a notebook V archive=

    Use the calculator program by downloading it according to the START-UP PROGRAMSa STANDARDa CALCULATOR

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

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

    Call the teacher to check the results of the work

    Now complete the tasks on one's own:

    Create 2 archives.

    Extract the file from the Wind_lecture_NachUrov.rar archive.

    Download several zipped files from the Internet to your folder and extract them.

    Conclusion by laboratory work: not all types of files are rationally archived in order to reduce their size. An example is a picture in JPEG format, sound in MP3 format, 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 do not make sense to archive?
    4. Why does it make sense to pack it into an archive before sending a text file by e-mail?
    5. Is it possible to archive the same file multiple times?

    Additionally:

    1. Where in life packaging (compression) is used. 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 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. Questions from students.

    Answers to students' questions.

    VII. Summary of the lesson.

    Summing up the lesson. Grading.

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

    Thanks everyone for the lesson!