public Blob pullBlob(
      DescriptorDigest blobDigest,
      Consumer<Long> blobSizeListener,
      Consumer<Long> writtenByteCountListener) {
    return Blobs.from(
        outputStream -> {
          try {
            callRegistryEndpoint(
                new BlobPuller(
                    registryEndpointRequestProperties,
                    blobDigest,
                    outputStream,
                    blobSizeListener,
                    writtenByteCountListener));

          } catch (RegistryException ex) {
            throw new IOException(ex);
          }
        },
        false);
  }
Gets the BLOB referenced by {@code blobDigest}. Note that the BLOB is only pulled when it is
written out.

@param blobDigest the digest of the BLOB to download
@param blobSizeListener callback to receive the total size of the BLOb to pull
@param writtenByteCountListener listens on byte count written to an output stream during the
    pull
@return a {@link Blob}
jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java