OpenComputers

OpenComputers

46M Downloads

I would like to be able to receive the file's checksum directly from the disk via the data card

igorkll opened this issue ยท 2 comments

commented

A good opportunity for a data card would be to calculate the file checksum directly from disk, bypassing RAM. that is, something like this: component.data.sha256FromFilesystem(address, path). in this case, the data card itself would read the file and output the result. this will avoid reading the entire file into RAM, which may not be enough to read the entire file.

commented

This would hurt separation of responsibilities, IMO. A better idea would be to have a callback-based checksum implementation (init/update/final).

commented

the data card itself would read the file and output the result

You just mean making a bridge between different component instead of making everything go through the CPU ?
I know that this feature exists in reality (DMA for example), but is it possible to implement it in OC ?
Like, make the components have a callback which allows for making a bridge, the number of bridges being directly limited by the tier of the computer itself ?