src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts/CompressedObjectTreeModel/setCompressionEnabled
class CompressedObjectTreeModel:	setCompressionEnabled(enabled: boolean): void {
		if (enabled === this.enabled) {
			return;
		}

		this.enabled = enabled;

		const root = this.model.getNode();
		const rootChildren = root.children as ITreeNode<ICompressedTreeNode<T>>[];
		const decompressedRootChildren = Iterable.map(rootChildren, decompress);
		const recompressedRootChildren = Iterable.map(decompressedRootChildren, enabled ? compress : noCompress);

		// it should be safe to always use deep diff mode here if an identity
		// provider is available, since we know the raw nodes are unchanged.
		this._setChildren(null, recompressedRootChildren, {
			diffIdentityProvider: this.identityProvider,
			diffDepth: Infinity,
		});
	}