Comments (9)
the file format is unfortunately not documented, and I don't have the time to do it the right way at the moment, but I'll give you a rough description here.
It's a TLV, type-length-value: blocks of information are packed with a 4 bytes (dword) identifying the nature of the block, another dword for the length of the payload, and then the payload.
After a block you can have another block (sequence).
A payload of a block can contain a sequence of blocks (nested).
In main.pas you'll find constants for the "type" part, all starting with FK_.
The zlib you were looking for is named FK_COMPRESSED_ZLIB (24), but you may want to give a look at others too.
from hfs2.
how can a payload block nested another block? if the length dword of parent payload block include the length of the child payload, how to make sure the real data of the parent block doesn't conflict with the type part(say 0-255)?
from hfs2.
i don't see any problem in nesting, and didn't meet any problem in making it.
The parent block knows nothing of the content (inner block) so its length will be the whole (including all children).
from hfs2.
say payload A is 24 04 01 24 03 04, payload B is 24 03 01 02. the nested should is:
24 08 01 24 03 (24 03 01 02) 04.
it may intercept the first 24 as a header and then cause the error?
from hfs2.
your example scenario makes no sense: your block cannot contain both an arbitrary payload AND another block.
One or the other.
Block A will contain Block B (and maybe also block C just after), or arbitrary bytes.
from hfs2.
Consider it a tree, where arbitrary bytes are the leaves.
https://www.google.com/search?q=tlv+file+format
from hfs2.
I mean doesn't the nested blocks need a delimiter in the bytes stream for safe?
from hfs2.
nope, this doesn't work with delimiters, you declare length in advance.
I didn't invent this, you'll find plenty of information googling.
from hfs2.
ok.
from hfs2.
Related Issues (20)
- hfs create corrupted vfs HOT 8
- 2.3m can't list folder on web if using the template of 2.4RC7. HOT 3
- 2.4 RC7 issue HOT 2
- Duplicated file upload HOT 1
- HFS.Libraries is not found. HOT 4
- 2.4rc7 can't login in if set password.
- Sometimes the service does not respond. HOT 3
- High concurrency HOT 2
- On the next generation network protocol HOT 1
- How to setup browsable to users only and file downlodable to everyone? HOT 3
- how to setup domain? HOT 9
- Bug# - When I use cloudflare proxy, user can't login HOT 2
- BUG [v2.4-rc07]: Trying to archive 1 or more items into a TAR file fails.
- Is Uploading files completely gone from this version? HOT 1
- 在同一个文件夹,但还是无法翻译为什么呀 HOT 1
- [Question] Indexing of VFS content ? HOT 8
- Bug/Feature request ? - The search shows results from folders with restricted access to users who are not part of who can access those folders HOT 1
- ♻️ scriptLib.pas - macrosLog, | Suggestions for Improvements and Optimization HOT 1
- Anyone compiled it on Free Pascal? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hfs2.