MarcoPon / SeqBox

A single file container/archive that can be reconstructed even after total loss of file system structures
MIT License
540 stars 29 forks source link

Support for OFS? #3

Closed piranna closed 7 years ago

piranna commented 7 years ago

It's marked as not working due to 488B sectors, but since both systems use the same concept, probably the metadata fields of OFS could be used by SeqBox format changing this last one to use the same positions (like a "extension" of the OFS format).

MarcoPon commented 7 years ago

It's similar in the fact there's a bit less usable space for the actual data and some additional info, but the latter is very different and has different purpose. The simple way to use SeqBox with Amiga OFS too would be to add a new block version with block size = 488. It works, and it's a 2 lines changed kind of modification, but I don't think it's really useful in general.

piranna commented 7 years ago

I think it's useful, specially if it's a matter of two lines of code. It could use 512 bytes sectors by default but have an option to set whatever you wants. Take in account that hard disks now use 4KB sectors, and also some filesystems like FAT or Ext2 group several sectors in a block, so this would lead for a faster scanning of data :-)

MarcoPon commented 7 years ago

Yes, as you can see in the spec, there are already 3 versions (that differs only on the block size): 1 default, with 512 bytes; 2 with 128 bytes (mostly added just for testing the tools with different block size, but was common in some older system from the CP/M days); 3 for 4KB, for when you are sure you are dealing only with modern systems. All it takes to select one or the other in the tools is the -sv switch. The objection with a v4 with 488 bytes is mostly due to the fact that it would be useful just for one system, and just for floppies (probably no one use OFS with an HD). But I'll definitely think about using/reserving it - even just because I was a passionate Amiga user myself! :D

piranna commented 7 years ago

128 bytes (mostly added just for testing the tools with different block size, but was common in some older system from the CP/M days)

I have just learned something new, didn't know they were used 128 bytes sectors! :-P

All it takes to select one or the other in the tools is the -sv switch

Ok, seems it's an API problem then... Yeah, in that case I would not have used a version selection switch but instead allowed to set the size directly in bytes and/or with a size prefix (512, 128B, 4KB, 16MB... this last one for AWS and MongoDB ;-) ). ODF is specific enough to NOT add a new version just for it, but maybe a new alternative flag to set the size and open the door for other custom sizes would do the trick :-)

But I'll definitely think about using/reserving it - even just because I was a passionate Amiga user myself! :D

I haven't used an Amiga, but used 68k Macintoshes since I was a child instead :-)