handled = dump_string("tag", bl, formatter);
} else if (iter->first == RGW_ATTR_ETAG) {
handled = dump_string("etag", bl, formatter);
+ } else if (iter->first == RGW_ATTR_COMPRESSION) {
+ handled = decode_dump<RGWCompressionInfo>("compression", bl, formatter);
}
if (!handled)
}
f->close_section();
}
+
+void compression_block::dump(Formatter *f) const
+{
+ f->dump_unsigned("old_ofs", old_ofs);
+ f->dump_unsigned("new_ofs", new_ofs);
+ f->dump_unsigned("len", len);
+}
+
+void RGWCompressionInfo::dump(Formatter *f) const
+{
+ f->dump_string("compression_type", compression_type);
+ f->dump_unsigned("orig_size", orig_size);
+ ::encode_json("blocks", blocks, f);
+}
::decode(len, bl);
DECODE_FINISH(bl);
}
+ void dump(Formatter *f) const;
};
WRITE_CLASS_ENCODER(compression_block)
::decode(orig_size, bl);
::decode(blocks, bl);
DECODE_FINISH(bl);
- }
+ }
+ void dump(Formatter *f) const;
};
WRITE_CLASS_ENCODER(RGWCompressionInfo)