How do I read a blob chunk by chunk in ruby rugged?
I'd like to be able to stream data through sinatra by reading data in chunks from a blob from Rugged. But it doesn't seem like blob supports a read(), and content() doesn't have an offset.
According to this thread on Rugged: https://github.com/libgit2/rugged/issues/335
There is no way to read blobs from an offset, unless you load the entire blob into memory first. This is because the default git backend's object database is filesystem-based, and it consists of deltas and compressions to save on space. And hence, you can't stream blob data, unless you load it all into memory first