使用C#的文件拆分器项目.请帮我. [英] File splitter project using C#. Please help me.

查看:85
本文介绍了使用C#的文件拆分器项目.请帮我.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
请帮助我,我想创建一个文件拆分器项目.

Hello,
please help me, I want to create a file splitter project.

推荐答案

尝试并通过 ^ ]部分
Try and go through the How to get an answer to your question
[^] section before your question here.


C#具有用于处理I/O的强大类.请参考 System.IO.Namespace文档.
:)
C# has powerful classes for handling I/O. Please refer to System.IO.Namespace documentation.
:)


简单来说,文件拆分器仅读取预定大小的数据,并根据这些大小的边界来破坏文件.您可以通过以下方式查看其逻辑:

而不是文件末尾
从流中读取字节的大小数
将这些字节写入具有唯一名称的新文件中

诀窍是确保您可以在另一端加入它们,通常这是通过应用程序将文件写出来的,并使用数字文件扩展名来完成的,该扩展名标识了文件写出的顺序.

既然您已完成了粗略的步骤,那么您应该很容易做到这一点.随时询问您是否存在特定的实现问题.
Simplistically, a file splitter just reads data in pre-determined sizes and breaks a file based on the boundaries at those size. You can view the logic for this as:

while not end of file
read the size number of bytes from the stream
write the those bytes to a new file with a unique name

The trick is to ensure that you can join them at the other end, which is usually accomplished by the application having written the files out as with a numeric file extension which identifies the order they were written out in.

Now that you have the rough steps, it should be fairly easy for you to accomplish this. Feel free to ask if you have specific implementation problems.


这篇关于使用C#的文件拆分器项目.请帮我.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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