高性能文件格式设计 [英] High performance file format design

查看:103
本文介绍了高性能文件格式设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计的文件格式最近包含四个块:标题块,数据块,事件块,注释Bolck.此文件格式用于数据收集情况.
标头块是固定长度.数据块是数据收集进度的增加.事件块,也请注意Bolck.
|听众|
|收集数据行1 |
|收集数据行2 |
|收集数据行3 |
| ...... |
|收集数据行n |
|事件数据行1 |
|事件数据行2 |
|事件数据行3 |
| ...... |
|事件数据行n |
|注释数据行1 |
|注释数据行2 |
|注释数据行3 |
| ...... |
| Remakr数据行n |
由于数据收集过程漫长,因此收集文件太大,必须使用mapview进行访问或读取.
假设数据块分配了64K大小的空间,并且数据收集已填充了该空间.如果继续写入,数据将覆盖事件块.如何设计文件或映射以确保将它们连续存储在文件中?
我的英语不好,请原谅我.

I design a file format that contains four blocks:Header Block,Data Block,Event Block,Remark Bolck recently.This file format is used in data collection situation.
The Header Block is fixed length.The Data Block is increase in data collection progress.The Event Block,Remark Bolck as also.
|Heder |
|Collect Data Row 1 |
|Collect Data Row 2 |
|Collect Data Row 3 |
|...... |
|Collect Data Row n |
|Event Data Row 1 |
|Event Data Row 2 |
|Event Data Row 3 |
|...... |
|Event Data Row n |
|Remark Data Row 1 |
|Remark Data Row 2 |
|Remark Data Row 3 |
|...... |
|Remakr Data Row n |
Because long process of data collection,the collection file is so big that must use mapview to acess or read.
Assume that the Data Block allocation 64K size space, and data collection has filled the space.If you continue to write the data will cover the Event Block.How to design a file or map in order to ensure they are stored contiguously in a file?
My english is poor, please forgive me.

推荐答案

为什么不使用单独的文件?您可以通过文件名约定(Head0001,Data0001,Evnt0001,Rema0001等)将相关信息保持在一起,也可以通过目录结构对它们进行分组.

彼得
Why not use separate files? You can keep related information together either by a file name convention (Head0001, Data0001, Evnt0001, Rema0001, etc) or grouping them by directory structure.

Peter


对于单个文件可以进行数字签名.但是,多个文件如何确保文件的连接关系没有改变?
For a single file can be digitally signed. However, multiple files how to ensure that the connection relationship of the file has not changed?


这篇关于高性能文件格式设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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