Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

add methods for reading and writting data from an offset #172

Closed
wanderer opened this issue May 27, 2017 · 4 comments
Closed

add methods for reading and writting data from an offset #172

wanderer opened this issue May 27, 2017 · 4 comments
Labels
dif/hard Having worked on the specific codebase is important help wanted P2 Medium: Good to have, but can wait until someone steps up

Comments

@wanderer
Copy link

It would be nice to support an option to read and write data from an offset.

const reader = require('ipfs-unixfs-engine').reader
promise = reader(CID, offset, length)
const writer = require('ipfs-unixfs-engine').writer
promise = writer(CID, offset, data)
@daviddias daviddias added dif/hard Having worked on the specific codebase is important help wanted labels Jun 3, 2017
@daviddias
Copy link
Contributor

There have been more requests for this feature - ipfs/js-ipfs#348 I agree that we should have it. A simple version of dropping bytes would be simple enough to achieve the API, then we can optimize its perf.

@daviddias
Copy link
Contributor

The writer is a bit more complex, not sure if it belongs here. Essentially what would need to be done is to fetch the whole file, modify and chunk the whole thing again. There will be a bunch of nodes that get reused, but this slight bit modification would have to be aware of the graph builder and chunker used.

@wanderer
Copy link
Author

wanderer commented Jun 3, 2017

this slight bit modification would have to be aware of the graph builder and chunker used.

right, and also different chunking schema are going to have different optimal offset units too

@daviddias daviddias added the status/deferred Conscious decision to pause or backlog label Jul 3, 2017
@daviddias daviddias added status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up and removed status/deferred Conscious decision to pause or backlog labels Oct 13, 2017
@achingbrain
Copy link
Collaborator

The ship this was shipped on set sail ages ago 🚢 ⚓️ 📦 🚀

@ghost ghost removed the status/ready Ready to be worked label Nov 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dif/hard Having worked on the specific codebase is important help wanted P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

3 participants