TweakHomePC

Dual-booting all versions of Windows and Linux

   Dual-Boot    |    Win 8    |    Win 7    |    Vista    |    Win XP/2K/NT    |    Win9x/Me    |    How to    |    Legacy 9x Tweaks    |    SiteMap   


 

Here: Home > Legacy 9x Tweaks > Modem & Net Tweaks


COMPRESSION PROTOCOLS

Compression speedsup downloading

Files can be either uncompressed or pre-compressed prior to downloading.

The uncompressed files can be compressed during the downloading process. These downloaded files are then decompressed
at the receiving modem (Hardware compression)
or
in main memory (Software compression).

Hardware compression is normally superior to Software compression.

NON-MODEM COMPRESSION [1]

Pre-compressed files (1)

Many users are confused by compression. Compression can have a major impact on download times especially as PPP (phone) lines are fully filled with data and the only way to obtain higher performance is to reduce the number of bytes transmitted. The principles involved are quite simple. It is the number of compression types and thier names that causes some confusion.

Let's first address compression that is external to the modem and the Internet.

Any requested data file, prior to sending will be of two varieties:
(1) pre-uncompressed, like text on a Web page, or
(2) pre-compressed, like a Zip file, MS's CAB files, or many graphics on a Web page.

Most files contain many repeated items of data. Nearly any file can be compressed by using a single marker for similar repeated items of data. The file's size is substantially reduced. It has also lost its function!

When decompressed, the markers are replaced with those correct data items, the file increases back to its original size and it now regains its functionality.

[top of page]

NON-MODEM COMPRESSION [2]

Pre-compressed files (2)

Suppose somebody offers you a 500KB files but he has compressed it to, say, 100KB in size. You download the 100KB, uncompress it, and now have the fully functional 500KB file - and have saved close to 500% of downloading time. Long live the Zip file!

When downloading, software compression programs are superior to compression that occurs during downloading or uploading, and should be used when appropriate:

1. They are more efficient. The degree of compression achieved can be massive. This is significant when large files are involved. Some files may be compressed to many hundreds of times smaller, saving very substantially on download time.
2. They are more versatile. You can group several files in a single compressed file to ensure that they all get transferred together.
3. They are convenient for storage and save hard disk space.
They carry the disadvantage of having to be manually compressed prior to sending and then de-compressed by the recipient.

This compression is totally separate from that occurring while downloading a file (next).

[top of page]

MODEM COMPRESSION [1]

Compression at Modem Level

If, however, the requested file is not, or can not be, pre-compressed (like much of a Web page) then you would have to download the entire 500KB in its native form - this is where compression at modem level comes to the rescue.

Pre-uncompressed files will benefit, very substantially, by being compressed during sending - this is a function of modem compression Protocols.

Pre-compressed files will not benefit - they can not be further compressed and will therefore can not benefit (they may get a little larger!).

Modem compression means squeezing more real data into each transmitted data Packet. Real data is the data file that is requested - it is divided up into many parts, and these parts are included in the many data Packets that are transmitted. The real data file is then re-assembled on its arrival at the receiving modem or in that PC's memory.

(The Packet size can be determined by a (IP)MTU setting - read MTU Fault).

[top of page]

MODEM COMPRESSION [2]

Packets

Each Packet has to contain more than just the requested data in order to survive on the Net and arrive at its correct destination. Every Packet contains some of the requested data, plus a Header and Footer for the TCP/IP Protocols that are required for sending/receiving of Internet data. This overhead of extra data is 40 bytes (Packet size of 576).

The actual data itself is composed of characters of 10 bits in size. A Start bit and a Stop bit are added to the normal 8-bit data byte - representing a substantial overhead of 20%

So this is what we have: (example only)

  Receive a Packet of 576 bytes (this is the total transmitted data)
  Less 40 bytes for TCP/IP = 536 bytes (this is the real data in 10-bit)
  Less 20% for Start/Stop bits = 428 bytes (the real data - about 74% of the Packet)
  i.e. about one quarter of an uncompressed download could be unwanted data!

[top of page]

MODEM COMPRESSION [3]

Improving matters

We can not increase the modem connection speed e.g. a 56K modem. Increased Packet size is ineffective (probably cause delays!). It is obvious we would wish to:

1. Compress, on send, the real data requested (much more real data in each Packet)
2. Eliminate the need for all the Start / Stop bits (more real data in each Packet)
3. Compress the Packets' Header / Footer (a little more real data in each Packet)
  And as phone line interference/noise often causes data damage (errors):
4. Reduce the number of errors occuring (less faulty Packets to resend)
5. Re-send those Packets that have errors on arrival (we would prefer none!)

That is exactly what modern modem Compression Protocols try to achieve.

The degree of success will, in the main, depend on your own modem and its Protocols, your ISP's modem and its Protocols, the quality of the phone line between your modem and your ISP's modem , and the 'Handshaking' agreement between the two modems.

If you understand these principles you will have little trouble selecting the Compression Protocol most suitable for your usage.

[top of page]

ERROR CONTROL [1]

Error Control

Working hand-in-hand with Data Compression is Error Control

Line noise, and other phone line anomalies, make it impossible for any standard modem to deliver error-free data. The greater the errors, then the slower the downloads.

Two connecting modems use an agreed code, at Handshaking, to make sure the data received matches the data sent. If there is a difference, then the data must be resent.

When two modems establish an error-controlled connection, called a 'reliable link', they are capable of filtering garbled characters caused by line noise. The line noise continues to exist - it is a work-around.

If line conditions are not good and filtering fails, then the Protocol requests retransmission. Multiple resends will dramatically slowdown the overall download time. Occasionally this can be so severe that the download or connection is terminated.

[top of page]

ERROR CONTROL [2]

There are two standards for Error Control Protocols:

1. MNP 2 - 4   Microcom Networking Protocol (MNP-5 is Data Compression)

2. V.42   Has two Error Control Protocols (V.42 is from CCITT)
      [a) LAP-M as primary (Link Access Procedure for Modems)
      [b) MNP -4 as secondary (used if other modem does not support LAP-M)

A modem will establish an error-controlled connection only with a modem that supports the same Error Control Protocols. This is why most modern modem support more than one Error Control Protocol. A V.42 can use it with a MNP-4, but a MNP-4 can not use V.42.

Some modems use proprietary Protocols and may use a non-standard Error Control Protocol e.g. Hayes V Smartmodem 9600 (LAP-B Protocol) and CompuCom's SpeedModem Champ.

V.42 and MNP-4 modems can give error-free connections (depending on conditions). Modems without Error-Correcting Protocols can not provide any error-free data transfers e.g. 2400bps Hayes-compatible modems.

[top of page]

START & STOP BITS

10-bit Characters

As stated previously, a file is sent in a large number of data Packets. The Packets contain parts of the requested data characters. A typical transmitted 10-bit character is composed of the standard 8-bit data byte plus a Start bit and a Stop bit.

Removing the two extra bits, during transmission, would increase the amount of real data in a Packet by nearly 20% - 'nearly' because there is always an overhead for a Protocol.

V.42 and MNP-4 have the added advantage that they can achieve this

When two modems establish a 'reliable link' using V.42 or MNP-4, then the sending modem strips away the Start and Stop bits and send the data to the other modem. The receiving modem now replaces the two bits and then passes the data to its computer.

You automatically send nearly 20% more real data when using V.42 or MNP-4

[top of page]

DATA COMPRESSION [1]

Protocols

All current modems support Data Compression Protocols. The sending modem compresses the data, and the receiving modem decompresses it to its original form.

Different types of files will be compressed by different amounts. Remember, also, that different degrees of Data Compression is achieved with different Protocols.

A modem can not support Data Compression without also supporting Error Correction - they are inextricably linked. The converse is not true - it is possible for a modem to support Error Correction while not supporting Data Compression.

It would be unusual to achieve the maximum available compression.

If you regularly download Zipped files, then you are unlikely to gain from using MNP-5 or V.42 bis which may actually make pre-compressed file larger. You should use MNP1-4 (Error Correction) and switch MNP-5 OFF (Data Compression). Consult your modem manual - you can use &K3 in Extra Settings for a US Robotics modem.

If you mostly Browse the Web and usually only download small files, then you are likely to gain by using V.42bis or MNP-5

[top of page]

DATA COMPRESSION [2]

Common Data Compression Protocols

LAP-M (Link Access Procedure for Modems)
      Error-Correction Protocol

MNP 1-4 (MicroCom Networking Protocol)
      Error-Correction Protocol

MNP -5
      Data Compression of up to 2:1 (MNP-5)
      Error Control inherent (contains MNP 1-4)

V.42
      Data Compression of up to 2:1
      Error Control inherent (contains LAP-M as primary, and MNP 1-4 as secondary)

V.42 bis
      Data Compression of up to 4:1
      Error Control not inherent (but MNP-5 is usually incorporated}

[top of page]

FLOW CONTROL

Flow Control & Modem Buffer

Increasing the Port speed (see Modems Menu) allows data to pass more quickly between the PC and modem. The modem needs to be protected from a surplus of data. This is where local Flow Control comes into play. Two types are supported by modems:

1. Software (XON / XOFF)
One of two Control bits (for ON or OFF) are inserted into the data stream. Problems occur if data to be sent already uses either of those Control bits, so it is best left alone.

2. Hardware (CTS / RTS, or Clear To Send and Request To Send)
When the sending modem is ready, it sets a CTS signal. This triggers the computer to send data to the sending modem until the CTR signal is cleared by that modem - this happens when that modem's RAM (FIFO buffer) has received as much data as it can cope with for the moment. When this data has been transmitted (buffer is emptied) to the receiving modem, the CTR signal is set again and the computer sends more data.
The receiving modem will clear the RTS signal when it has received as much data as it can cope with, and set RTS again when it is ready for more data.

[top of page]

Please remember that you alone are responsible for the consequences of any changes you make to your computer hardware or software.

Copyright © LarryM 1998-2015 thpc@mail.com