github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/doc/schema/bytes.txt (about) 1 Description of a series of bytes. 2 3 A "bytes" is a metadata (JSON) blob to describe blobs. It's a recursive 4 definition that's able to describe a hash tree, describing very large 5 blobs (or "files"). 6 7 A "bytes" blob can be used on its own, but is also used by things like 8 a "file" schema blob. 9 10 11 {"camliVersion": 1, 12 "camliType": "bytes", 13 14 // Required. Array of contiguous regions of bytes. Zero or more elements. 15 // 16 // Each element must have: 17 // "size": the number of bytes that this element contributes to array of bytes. 18 // Required, and must be greater than zero. 19 // 20 // At most one of: 21 // "blobRef": where to get the raw bytes from. if this and "bytesRef" 22 // are missing, the bytes are all zero (e.g. a sparse file hole) 23 // "bytesRef": alternative to blobRef, where to get the range's bytes 24 // from, but pointing recursively at a "bytes" schema blob 25 // describing the range, recursively. large files are made of 26 // these in a hash tree. it is an error if both "bytesRef" 27 // and "blobRef" are specified. 28 // 29 // Optional: 30 // "offset": the number of bytes into blobRef or bytesRef to skip to 31 // get the necessary bytes for the range. usually zero (unspecified) 32 "parts": [ 33 {"blobRef": "digalg-blobref", "size": 1024}, 34 {"bytesRef": "digalg-blobref", "size": 5000000, "offset": 492 }, 35 {"size": 1000000}, 36 {"blobRef": "digalg-blobref", "size": 10}, 37 ] 38 }