Since the table is predetermined, it is likely not the most efficient way to compress your message and the compressed message will not be as short as it could be. Both of the computers already know the compression table, so it is not necessary to include it with the compressed message. (Even with a replacement table included in the compressed message, it can still be shorter than the original message, depending on the algorithm used to compress it and the message itself.) Another option is to use a compression table that is known beforehand by both the computer doing the compression and the computer doing the expansion. Including a table takes up more memory though and makes the compression less effective. As you stated, we can include a table with the compressed message that tells how to undo the compression. In order for a computer to reconstruct the original message, we have a couple of options. In this case, the compressed string is "zczzzdzf" which is 5 characters shorter than the original string. Select Export to open the Export Image as JPEG dialog box. Scroll down the list and select JPEG Image. Click Select File Type to open the list of available file types. Use the Export As box to assign a name and location to the image. We can see that "ab" repeats many times in the string, so we can replace "ab" with something shorter, such as "z". To save an image in the JPEG format using GIMP: Select File > Export As. Suppose we want to compress the string "abcabababdabf". Yes, one way to compress information is to replace frequently repeated sequences with shorter sequences.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |