1

Let's say we have an object stored on S3. Is it possible to read it in the reverse byte order? Does S3 API provide with such a functionality?

I need to read a huge file in the reverse order because it was written in the reverse order by someone else. I don't want to do that in memory, I don't want to save the file on my local disk and then read it again.

Andremoniy
  • 32,711
  • 17
  • 122
  • 230
  • There might be some help [here](https://stackoverflow.com/q/56139995/102937). It describes breaking a file into smaller chunks using an EC2 instance. You could then read the chunks in reverse order. – Robert Harvey Apr 06 '20 at 14:44
  • @RobertHarvey the idea of reading chunks in reverse order and then reverse them in memory is a good one. I was thinking about the same thing. Thanks! – Andremoniy Apr 06 '20 at 19:57
  • Hi @Andremoniy, if you're looking for a solution programmatically using Java I can try helping you out with that, I have a working solution which is fast and doesn't require much memory – Aman Vaishya Apr 17 '20 at 14:59

1 Answers1

3

No, this is not possible.

You can download the entire file or a range request of any single contiguous range of bytes, but this always happens in the same order that they were uploaded.

Michael - sqlbot
  • 154,904
  • 21
  • 299
  • 378