"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.readAndParseSnapshotBlob = void 0;
const client_utils_1 = require("@fluid-internal/client-utils");
/**
 * Reads and parses a snapshot blob from storage service.
 */
const readAndParseSnapshotBlob = async (blobPath, service, parse) => {
    const treeBuffer = await service.readBlob(blobPath);
    const treeBufferString = (0, client_utils_1.bufferToString)(treeBuffer, "utf8");
    return parse(treeBufferString);
};
exports.readAndParseSnapshotBlob = readAndParseSnapshotBlob;
//# sourceMappingURL=readSnapshotBlob.js.map