登录
首页 » 文件处理 » 文件合并算法将原来的文件统一当作二进制文件依次读取,然后依次写入一个新的二进制文件中,这样就完成了合并操作;反向操作就可以分割文件了…… 先自己定义一个通用的文...

文件合并算法将原来的文件统一当作二进制文件依次读取,然后依次写入一个新的二进制文件中,这样就完成了合并操作;反向操作就可以分割文件了…… 先自己定义一个通用的文...

于 2022-09-07 发布 文件大小:1.98 kB
0 191
下载积分: 2 下载次数: 2

代码说明:

文件合并算法将原来的文件统一当作二进制文件依次读取,然后依次写入一个新的二进制文件中,这样就完成了合并操作;反向操作就可以分割文件了…… 先自己定义一个通用的文件表示,比如说下列格式:文件名长度(4字节),文件名,文件长度(4字节),文件内容。然后新建一个文件,将你要加入的文件依次写进(当作二进制文件)。 至于还原吗,先读入合并后的文件,然后依次按以下过程还原文件:读入文件名长度,按此长度得到文件名,读入文件长度,按此长度得到文件的内容,写到磁盘上即可。具体的编程见以下例子: //以下为文件合并与分解函数,合并文件后的文件中各子文件顺序存放-document merging algorithm to the original document as a unified binary files were read, followed by the introduction of a new binary file, so it completed the merger operation; Contrarians can separate document ... their first definition of a common document, for instance, the following format : Name length (4 bytes), file name, file size (4 bytes), the contents of the file. Then a new document, you will be included in the document were included (as binary files). As for the reduction yet, dialer after the merger documents, to be followed by the following process Reduction Document : Reading into the file name length, according to the length of availability of documents, and read into the length of documents, accord

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C++编写的简单的XML文件的解析和生成,可以完整的将XML文件解析成树结构,或者根据内容生成XML文件...
    C++编写的简单的XML文件的解析和生成,可以完整的将XML文件解析成树结构,或者根据内容生成XML文件-C++ Prepared a simple XML file parsing and generation, can be a complete XML document into a tree structure analysis, or generated in accordance with the contents of XML documents
    2023-05-22 22:40:03下载
    积分:1
  • VC++6.0写的关于用API函数判断文件是否存在的测试程序,欢迎大家下载...
    VC++6.0写的关于用API函数判断文件是否存在的测试程序,欢迎大家下载-VC++ 6.0 write on paper with API function to determine the existence of the test procedure, welcome everyone to download
    2022-08-20 18:49:12下载
    积分:1
  • 加密开源代码,可进行多种加密以及相关处理
    加密开源代码,可进行多种加密以及相关处理-Open source encryption code, it can conduct a variety of encryption and related treatment
    2022-05-09 01:48:36下载
    积分:1
  • INI文件的操作,是使用非常方便:1。首先,inifil删除…
    操作INI文件,非常方便... 使用方法: 1.先把IniFile.h,IniFile.ccp加入Porject,在要使用该类的头文件中加入 #include "IniFile.h",及CIniFile IniFile 2.读取和写入: string = IniFile.GetString("section","item","默认") int = IniFile.GetInt("section","item",666) IniFile.SetString("section","item","设置值") IniFile.SetInt("section","item",666) 3.ini文件名及路径在初始化时,用SetFileName()设置-Operation of INI file, is very convenient to use ...: 1. First IniFile.h, IniFile.ccp adding Porject, to be used in the first such document by adding# Include
    2023-07-09 08:15:03下载
    积分:1
  • CMarkUP最新版11.5
    最有名的一个VC++外部类,Cmarkup,现在已经出了最新版11.5了,现在网上的都是6.1以下的版,希望这个新版对你们有所帮助,一些相用VC开发VML的朋友千万不要错过-one of the most famous VC external categories, Cmarkup, now out of the latest version 8.2. Now online are below the 6.1 version, I hope this new right will be helpful. Some compared with VC VML friend Do not miss
    2023-08-26 14:00:03下载
    积分:1
  • 用C语言编写程序,以单链表为存储结构,对学生成绩进行处理,要求实现如下功能: (1)随意输入1班至少10人的学号、成绩,将数据按成绩由高到低的顺序保存在一个...
    用C语言编写程序,以单链表为存储结构,对学生成绩进行处理,要求实现如下功能: (1)随意输入1班至少10人的学号、成绩,将数据按成绩由高到低的顺序保存在一个单链表中;随意输入2班至少10人的学号、成绩,将数据按成绩由高到低的顺序保存在另一个单链表中; (2)对至少4人的成绩进行修正,输入班级、学号和成绩修正,如+5,-3,-10,+2,但仍要保持数据按成绩由高到低有序; (3)分别按顺序输出两个班的成绩表。 (4)将两个班的单链表合并成一个单链表,数据仍按成绩由高到低有序; (5)按成绩由高到低的顺序输出两个班的成绩总表,含班级、学号、成绩信息。 -C language programming, a single-linked list structure for storage, for the performance of their students, call for the following functions : (a) a duty free importation of at least 10 people, the school, achievements, data based on merit is in the order kept in a single-linked list; free importation of two classes of at least 10 people, the school, achievements, data based on merit is in the order of another single-linked list; (2) at least four pairs of accomplishments that, the importation of class, school and accomplishments amendments, such as 5,-3,-10, 2, but they still maintain data based on merit ranking and orderly; (3) the sequence of two classes of output reports. (4) the two classes of sin
    2023-08-05 15:45:03下载
    积分:1
  • 8个用Java编写的I/O程序
    8个用Java编写的I/O程序-eight prepared by the Java I/O procedures
    2022-04-24 02:04:05下载
    积分:1
  • SADirRead Copyright (C) 2002 Smaller Animals Software, Inc. This sof...
    SADirRead Copyright (C) 2002 Smaller Animals Software, Inc. This software is provided as-is , without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. http://www.smalleranimals.com smallest@smalleranimals.com
    2023-05-25 18:10:04下载
    积分:1
  • 问答管理系统
    资源描述就是一个用户管理系统啊,然后里面需要登陆,登录了之后可以加关注,还可以点赞,还可以乱七八糟回答问题提出问题啥的,还可以查看自己的关注列表。
    2022-03-14 07:05:31下载
    积分:1
  • 按照由DE2板子生成的GRGB文件,得到bmp图像
    按照由DE2板子生成的GRGB文件,得到bmp图像-Generated by the DE2 board in accordance with GRGB documents obtained bmp image
    2022-07-08 13:41:50下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载