MCPcopy
hub / github.com/kopia/kopia / maybeCompressedObjectID

Function maybeCompressedObjectID

repo/object/object_writer.go:240–248  ·  view source on GitHub ↗
(contentID content.ID, isCompressed bool)

Source from the content-addressed store, hash-verified

238}
239
240func maybeCompressedObjectID(contentID content.ID, isCompressed bool) ID {
241 oid := DirectObjectID(contentID)
242
243 if isCompressed {
244 oid = compressed(oid)
245 }
246
247 return oid
248}
249
250func maybeCompressedContentBytes(comp compression.Compressor, input gather.Bytes, output *gather.WriteBuffer) (data gather.Bytes, isCompressed bool, err error) {
251 if comp != nil {

Callers 1

Calls 2

DirectObjectIDFunction · 0.85
compressedFunction · 0.85

Tested by

no test coverage detected