0

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.

Wilhelm
  • 6,506
  • 5
  • 30
  • 26

1 Answers1

0

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

Wilhelm
  • 6,506
  • 5
  • 30
  • 26