+
+ /* For files that only need to be broken apart into a few objects, store
+ * the list of objects directly. For larger files, store the data
+ * out-of-line and provide a pointer to the indrect object. */
+ if (segment_list.size() < 8) {
+ string blocklist = "";
+ for (list<string>::iterator i = segment_list.begin();
+ i != segment_list.end(); ++i) {
+ if (i != segment_list.begin())
+ blocklist += " ";
+ blocklist += *i;
+ }
+ file_info["data"] = blocklist;
+ } else {
+ string blocklist = "";
+ for (list<string>::iterator i = segment_list.begin();
+ i != segment_list.end(); ++i) {
+ blocklist += *i + "\n";
+ }
+ string indirect = tss->write_object(blocklist.data(), blocklist.size(),
+ "indirect");
+ file_info["data"] = "@" + indirect;
+ }