附加两种不同的文件格式并将其分离 [英] Append two different file formats and detach them back

查看:80
本文介绍了附加两种不同的文件格式并将其分离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何附加两种不同的文件格式并将它们分离回原始格式?

解决方案

创建新文件

添加一个标识第一个文件的标题记录,其类型和长度。

读取文件,并将其写入输出。

添加预告文件确认文件结束。

重复任意数量的文件。

添加en和数据记录确认不再有文件。

关闭输出文件。



或者你自己设计的这个主题的任何变化。



要拆分它,只需颠倒这个过程。 / BLOCKQUOTE>

How to append two different file formats and detach them back to its original form?

解决方案

Create a new file
Add a header record identifying the first file, its type and length.
Read the file, and write it to the output.
Add a trailer record confirming the end of the file.
Repeat for any number of files.
Add en and of data record confirming no more file.
Close the output file.

Or any variation on this theme of your own design.

To split it, just reverse this process.


这篇关于附加两种不同的文件格式并将其分离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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