Internet Windows Android

Why is it possible to reduce the file size. Archiving files Files and the file system

Part 1
Topic: "File archiving".

Lesson Objectives:


  • help students gain an understanding of file archiving, 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, ability to take notes.
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 a picture in JPEG format, sound in MP3 format, 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 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.

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 the desired files, select the files and folders that 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 requests, use the "Add to" command. 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

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. 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 launching the archive as a normal 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 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 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 choosing the "Password" command in the "File" menu or when clicking 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. You should not use words of any language as a password, a random combination of letters and numbers is the best choice. 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.

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?

III. Practical part.

To complete this lesson's task, create a new "File Archive" folder on your desktop and copy some files into 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.

A new archive file, Archive1, will appear in your folder. You can open the archive file and click Info to call 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 archive name to archive>" command. 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 "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, unzip 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.

IV. D / s

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.
part 1

» [Lesson #19 Archiving files]

Topic: "File archiving".

Lesson Objectives:

    help students gain an understanding of file archiving, 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, 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 a picture in JPEG format, sound in MP3 format, 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 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.

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 the desired files, select the files and folders that 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

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. 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 launching the archive as a normal 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 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 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 choosing the "Password" command in the "File" menu or when clicking 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. You should not use words of any language as a password, a random combination of letters and numbers is the best choice. 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 does it make sense to pack it into an archive before sending a text file by e-mail?

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.

A new archive file, Archive1, will appear in your folder. You can open the archive file and click Info to call 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, unzip 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.

Topic: "File archiving".


Lesson Objectives:

help students gain an understanding of file archiving, 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, ability to take notes.


Equipment:

board, computer, computer presentation.


Lesson plan:

I. Org. moment. (1 minute)
II. Checking and updating knowledge. (5 minutes)
III. Theoretical part. (10 min)
IV. Practical part. (15 minutes)
V. Homework (2 min)
VI. Questions from students. (5 minutes)
VII. 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 a picture in JPEG format, sound in MP3 format, and others.

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

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.


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 the desired files, select the files and folders that 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


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. 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 launching the archive as a normal 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 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 you can use WinRAR.

SFX archives, like any other executable files, usually have a . EXE. 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 choosing the "Password" command in the "File" menu or when clicking 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. You should not use words of any language as a password, a random combination of letters and numbers is the best choice. 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.


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?

III. Practical part.

For this lesson's activity, create a new File Backup folder in your folder and copy the files from the Data Backup folder into 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.

A new archive file, Archive1, will appear in your folder. You can open the archive file and click Info to call 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<имя архива>". 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, unzip 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.


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. 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.

In today's world, archiving files is becoming increasingly important. Many sooner or later face the need to reduce the amount of transmitted information. In the process of working with a computer, any user begins to think about compressing folders and files. When they get into the archive, they lose a considerable part of their volume, which makes it easy to work by writing them to removable media or transferring them over various networks. Archiving of documents is carried out due to the fact that a certain set of characters is replaced by one or two characters. Accordingly, when unpacking, a reverse substitution occurs.

Thus, archiving files is a process of reducing the size in bytes. The user does not notice the action taking place, working with the archive as with a regular folder. However, in fact, the difference in volume can be very significant, which is especially felt against the background of texts and tables. They can be reduced dozens of times, losing the main part of the volume. However, individual files can hardly be compressed, as they have already undergone such processing. This, of course, primarily applies to certain music and image formats.

File archiving has received the greatest use when sending over local and global networks in order to reduce the load on them. Transfer in this case is much faster. In addition, e-mail has limits on the amount of information transmitted, so data compression can be very useful here too. It is also quite convenient that a large number of files can be combined into one archive, which will be very easy to work with. The entire process is managed by one program. With its help, it is possible to carry out compression without any skills.

Thanks to the program, file archiving is performed literally in a matter of seconds, but first it must be found and installed on the computer. Although today many operating systems contain an archiver that allows you to pack and unpack certain types of data. Next, select the files to be archived. By clicking on the selected files with the right mouse button, you can quickly add them to the archive. At the last stage, the program asks for the name and location of the compressed files. Unpacking is performed by double-clicking the left mouse button on the archive.

Sometimes you may need to compress files using individual settings. Then these applications can provide a set of different settings. For example, the user can specify the creation of a password for the archive, the format, and the like. Among such functions is the possibility of creating self-extracting and multi-volume archives. The first of them have a special module, thanks to which it is possible to extract data by simply launching the application. In this case, the presence of the archiver on the local computer is not required. As for multi-volume archives, they allow you to split a compressed file into separate parts.


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


Many, for sure, had to deal with file archivers. It is enough to list their names: ZIP, RAR, ARJ. Such 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 source files. Compressors compress only one executable file (EXE type) at a time in such a way that after the program is launched, it self-extracts in RAM and continues its work. These are programs such as PKLITE, RAK, LZEXE. To date, the leader is the UPX program.


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.


Redundancy All of 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.


Archivers When compressed, 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 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 textual information is to replace typical phrases with the corresponding bytes, not one character, but the 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 drawings are encoded in bytes. Areas of the same color contain sequences of bytes. These are the sequences that we encode with just two bytes: a byte is a sample and a byte is the number of samples. Thus, the volume of the file is reduced several times.