Question: In the context of SMS data compression (as per 3GPP standards), what happens when a matching data slice (longer than two octets) is found within the specified window during the scanning process?
Option 1: The input data octet at the current reading position is written to a literal buffer, and both buffers' positions are incremented by one.
Option 2: A slice descriptor is written to the output data buffer, incrementing its writing position by two, but the reading position in the input buffer remains unchanged.
Option 3: A slice descriptor is written to the output data buffer, and the current writing position is incremented by two. The current reading position in the input data buffer is also incremented by the length of the matching slice.
Option 4: The literal buffer is immediately written out, including its block header, regardless of its size, and then the process restarts from the new reading position.
Explanation: When a matching data slice (longer than two octets) is found within the specified window, the process involves writing a slice descriptor to the output buffer, which effectively references the matching slice. This step is memory-efficient. The current writing position in the output buffer is incremented by two to account for the descriptor's size. Simultaneously, the reading position in the input buffer jumps forward by the length of the newly found matching slice, ensuring that the process continues efficiently without re-processing known data. This approach optimizes compression by minimizing the output size and streamlining the processing of the input data.