Write a MATLAB program that encodes a given string using LZ78.

Hi,
I need to start encode the string using LZ78 Algorithm ,now how I can start e.g. function **
My Project is
Encode (i.e., compress) the string BABAABRRRA using the LZ78 algorithm.
Decode (i.e., decompress) the sequence (0, B) (0, A) (1, A) (2, B) (0, R) (5, R) (2, )
kindly provide me the solution I am just searching and finding the way to start encode string in mat lab
Thank you for your cooperation

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 7 月 5 日

0 投票

function encoded_string = lz78_encode( string_to_encode )
would be an acceptable way to start.

5 件のコメント

Saima
Saima 2013 年 7 月 5 日
not workable
Walter Roberson
Walter Roberson 2013 年 7 月 5 日
In what regard is it not workable?
Jan
Jan 2013 年 7 月 7 日
@Saima: Of course this works. It is the first line of the code and you have to insert the other lines only. It is not the nature of a forum to solve your work, but to assist.
Walter Roberson
Walter Roberson 2013 年 7 月 7 日
The question asked was "I am just searching and finding the way to start encode string" and the above code is one of the (many) ways to start.
Jan
Jan 2013 年 7 月 7 日
@Saima: Of course you get more help when you ask a more specific question. It is more likely that you get assistance, when you show any own effort.

サインインしてコメントする。

カテゴリ

質問済み:

2013 年 7 月 5 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by