主权项 |
1. A method for retrieving at least a portion of a first data file, the method being implemented by a computer system that includes one or more processors configured to execute computer program modules, the first data file being stored in a storage device in communication with the computer system, the method comprising:
receiving, by the computer system from a client computer system in communication with the computer system, a request for the at least a portion of the first data file, the request including a start of the at least a portion of the first data file and a size of the at least a portion of the first data file; computing, by the computer system, a data offset that is aligned to an integer multiple of a block size of the storage device and nearest to the start of the at least a portion of the first data file; computing, by the computer system, a byte-range that is an integer multiple of the block size of the storage device, the byte-range being greater than and encompasses the size of the at least a portion of the first data file; reading, by the computer system, data within the byte-range and transferring the data within the byte-range starting at the data offset into memory of the computer system; and transmitting, by the computer system to the client computer system, the at least a portion of the first data file from the memory starting at an offset relative to the data offset that is aligned to an integer multiple of the block size of the storage device.
|