静态霍夫曼编码 [英] static huffman coding

查看:101
本文介绍了静态霍夫曼编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用霍夫曼编码压缩了文件.文件夹怎么样?
我需要你的提示.
谢谢.

I have already compressed a file using huffman coding.How about a folder?
I need your hints.
Thanks.

推荐答案

文件夹只是一组文件,它没有文件那样的物理存在.您应该做的是创建一个包含文件夹中所有文件的存档(如果需要,可以自己设计),然后压缩该存档.
A folder is merely a set of files, it has no physical existence in the way a file does. What you should do is create an archive (of your own design if necessary) containing all the files in the folder and then compress that archive.


您需要添加一个标头,其中包含有关文件合并为一个文件.尽管名称是标题,但对于压缩文件,此信息将添加到文件末尾.这样,以后添加新文件而不必完全重新创建文件要容易得多.

您只需要像简单文件系统一样添加有关文件的数据.

因此,相对路径,带有起始位置和大小的文件名.

结构化存储:
http://msdn.microsoft.com/en-us/library/aa380369%28v = vs.85%29.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/aa380364%28v = vs.85%29.aspx [ ^ ]

http://www.codeguru.com/cpp/wp/system/article.php/c2821 [^ ]

NFileStorage:
http://nfilestorage.codeplex.com/ [ ^ ]

祝你好运!
You need to add a header with information about the files you combined into one files. Although the name is header, for compressed files this information is added to the end of the file. This way it is much easier to add new files later without having to recreate the file completely.

You simply need to add data about the file like a simple file system would.

so, relative path, filenames with start position and size.

Structured Storage:
http://msdn.microsoft.com/en-us/library/aa380369%28v=vs.85%29.aspx[^]
http://msdn.microsoft.com/en-us/library/aa380364%28v=vs.85%29.aspx[^]

http://www.codeguru.com/cpp/w-p/system/article.php/c2821[^]

NFileStorage:
http://nfilestorage.codeplex.com/[^]

Good luck!


这篇关于静态霍夫曼编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆