bCompressed

bCompressed

#Overview

name: bCompressed

The value of this variable can be defined or overridden in .ini config files. 2 .ini config files referencing this setting variable.

It is referenced in 62 C++ source files. Also referenced in 1 C# build file meaning it may affect the build system logic.

#Summary

#Usage in the C++ source code

The purpose of bCompressed is to indicate whether data compression is enabled for a particular asset or operation. This variable is used across various Unreal Engine subsystems to control compression behavior. Here are the key points about bCompressed:

  1. It is used in multiple Unreal Engine subsystems, including rendering, networking, file I/O, and asset management.

  2. The value of bCompressed is typically set based on configuration settings or during runtime operations that involve data compression.

  3. It interacts with other variables and systems related to data compression, such as compression formats, quality settings, and decompression routines.

  4. Developers must be aware that when bCompressed is true, additional processing (compression/decompression) may be required when working with the associated data.

  5. Best practices include:

    • Ensuring proper handling of compressed data when reading/writing
    • Considering performance implications of compression in time-sensitive operations
    • Using appropriate compression settings for different types of data
  6. The variable is used in various contexts, such as texture compression, network packet compression, and file storage optimization.

  7. In some cases, compression can be selectively enabled or disabled based on factors like data size or performance requirements.

  8. Developers should be cautious when modifying bCompressed, as it can affect data integrity and compatibility if not handled correctly.

When using this variable, developers should consider the trade-offs between data size reduction and computational overhead for compression/decompression operations.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseGame.ini:93, section: [/Script/UnrealEd.ProjectPackagingSettings]

Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:104, section: [/Script/UnrealEd.ProjectPackagingSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp:68

Scope (from outer to inner):

file
namespace    UE::DerivedData

Source code excerpt:

ILegacyCacheStore* CreateHttpCacheStore(const TCHAR* Name, const TCHAR* Config, ICacheStoreOwner* Owner);
void CreateMemoryCacheStore(IMemoryCacheStore*& OutCache, const TCHAR* Name, const TCHAR* Config, ICacheStoreOwner* Owner);
IPakFileCacheStore* CreatePakFileCacheStore(const TCHAR* Name, const TCHAR* Filename, bool bWriting, bool bCompressed, ICacheStoreOwner* Owner);
ILegacyCacheStore* CreateS3CacheStore(const TCHAR* Name, const TCHAR* Config, ICacheStoreOwner& Owner);
ILegacyCacheStore* CreateZenCacheStore(const TCHAR* Name, const TCHAR* Config, ICacheStoreOwner* Owner);
ILegacyCacheStore* TryCreateCacheStoreReplay(ILegacyCacheStore* InnerCache);

/**
 * This class is used to create a singleton that represents the derived data cache hierarchy and all of the wrappers necessary

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp:351

Scope (from outer to inner):

file
namespace    UE::DerivedData
class        class FDerivedDataBackendGraph final : public FDerivedDataBackend, ICacheStoreOwner, ICacheStoreGraph
function     bool ParsePak

Source code excerpt:

		FString PakFilename;
		FParse::Value( Entry, TEXT("Filename="), PakFilename );
		bool bCompressed = GetParsedBool(Entry, TEXT("Compressed="));

		if (PakFilename.IsEmpty())
		{
			UE_LOG(LogDerivedDataCache, Log, TEXT("FDerivedDataBackendGraph: %s pak cache Filename not found in *engine.ini, will not use a pak cache."), NodeName);
			return false;
		}

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp:370

Scope (from outer to inner):

file
namespace    UE::DerivedData
class        class FDerivedDataBackendGraph final : public FDerivedDataBackend, ICacheStoreOwner, ICacheStoreGraph
function     bool ParsePak

Source code excerpt:

			ReadPakFilename = PakFilename;
			WritePakFilename = PakFilename + TEXT(".") + Temp.ToString();
			WritePakCache = CreatePakFileCacheStore(NodeName, *WritePakFilename, /*bWriting*/ true, bCompressed, this);
			PakNode = WritePakCache;
			InParsedNodes.Add(NodeName, WritePakCache);
			return true;
		}
		else
		{

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp:384

Scope (from outer to inner):

file
namespace    UE::DerivedData
class        class FDerivedDataBackendGraph final : public FDerivedDataBackend, ICacheStoreOwner, ICacheStoreGraph
function     bool ParsePak

Source code excerpt:

			}

			IPakFileCacheStore* ReadPak = CreatePakFileCacheStore(NodeName, *PakFilename, /*bWriting*/ false, bCompressed, this);
			ReadPakFilename = PakFilename;
			PakNode = ReadPak;
			ReadPakCache.Add(ReadPak);
			InParsedNodes.Add(NodeName, ReadPak);
			return true;
		}

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/PakFileCacheStore.cpp:1645

Scope (from outer to inner):

file
namespace    UE::DerivedData
function     IPakFileCacheStore* CreatePakFileCacheStore

Source code excerpt:

}

IPakFileCacheStore* CreatePakFileCacheStore(const TCHAR* Name, const TCHAR* CachePath, bool bWriting, bool bCompressed, ICacheStoreOwner* Owner)
{
	return bCompressed ? new FCompressedPakFileCacheStore(Name, CachePath, bWriting, Owner) : new FPakFileCacheStore(Name, CachePath, bWriting, Owner);
}

} // UE::DerivedData

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Classes/Settings/ProjectPackagingSettings.h:336

Scope (from outer to inner):

file
class        class UProjectPackagingSettings : public UObject

Source code excerpt:

	 */
	UPROPERTY(config, EditAnywhere, Category=Packaging, AdvancedDisplay, meta=(DisplayName="Create compressed cooked packages"))
	bool bCompressed;
	
	/**
	 * A comma separated list of formats to use for .pak file and IoStore compression. If more than one is specified, the list is in order of priority, with fallbacks to other formats
	 * in case of errors or unavailability of the format (plugin not enabled, etc).
	 * Commonly PackageCompressionFormat=Oodle or PackageCompressionFormat=None
	 */

#Loc: <Workspace>/Engine/Source/Developer/IoStoreUtilities/Private/IoStoreUtilities.cpp:2107

Scope (from outer to inner):

file
function     static bool ConvertToIoStoreShaderLibrary
lambda-function

Source code excerpt:


			CompressedShaderGroupMemory = reinterpret_cast<uint8*>(FMemory::Malloc(CompressedGroupSize));
			bool bCompressed = ShaderCodeArchive::CompressShaderWithOodle(CompressedShaderGroupMemory, CompressedGroupSize, UncompressedGroupMemory, Group.UncompressedSize, InShaderOodleCompressor, InShaderOodleLevel);
			checkf(bCompressed, TEXT("We could not compress the shader group after providing an estimated memory."));

			TTuple<FIoChunkId, FIoBuffer, uint32>& OutCodeIoChunk = OutCodeIoChunks[GroupIndex];
			OutCodeIoChunk.Get<0>() = IoStoreLibraryHeader.ShaderGroupIoHashes[GroupIndex];
			// This value is the load order factor for the group (the smaller, the more likely), that IoStore will use to sort the chunks.
			// We calculate it as the smallest shader index in the group, which shouldn't be bad. Arguably a better way would be to get the lowest-numbered shadermap that references _any_ shader in the group, 
			// but it's much, much slower to calculate and the resulting order would be likely the same/similar most of the time

#Loc: <Workspace>/Engine/Source/Developer/IoStoreUtilities/Private/IoStoreUtilities.cpp:6755

Scope (from outer to inner):

file
namespace    DescribeUtils

Source code excerpt:

		TArray<FPackageDesc*> LocalizedPackages;
		TArray<FPackageRedirect> PackageRedirects;
		bool bCompressed;
		bool bSigned;
		bool bEncrypted;
		bool bIndexed;
	};

	struct FPackageLocation

#Loc: <Workspace>/Engine/Source/Developer/IoStoreUtilities/Private/IoStoreUtilities.cpp:7023

Scope (from outer to inner):

file
namespace    DescribeUtils
function     TOptional<FContainerPackageInfo> TryGetContainerPackageInfo
lambda-function

Source code excerpt:

			ContainerDesc->EncryptionKeyGuid = Job.Reader->GetEncryptionKeyGuid();
			EIoContainerFlags Flags = Job.Reader->GetContainerFlags();
			ContainerDesc->bCompressed = bool(Flags & EIoContainerFlags::Compressed);
			ContainerDesc->bEncrypted = bool(Flags & EIoContainerFlags::Encrypted);
			ContainerDesc->bSigned = bool(Flags & EIoContainerFlags::Signed);
			ContainerDesc->bIndexed = bool(Flags & EIoContainerFlags::Indexed);
			Job.ContainerDesc = ContainerDesc;

			TIoStatusOr<FIoBuffer> IoBuffer = Job.Reader->Read(CreateIoChunkId(Job.Reader->GetContainerId().Value(), 0, EIoChunkType::ContainerHeader), FIoReadOptions());

#Loc: <Workspace>/Engine/Source/Developer/IoStoreUtilities/Private/IoStoreUtilities.cpp:7486

Scope (from outer to inner):

file
function     int32 Describe

Source code excerpt:


			OutputOverride->Logf(ELogVerbosity::Display, TEXT("\t\t      ContainerId: 0x%llX"), ContainerDesc->Id.Value());
			OutputOverride->Logf(ELogVerbosity::Display, TEXT("\t\t       Compressed: %s"), ContainerDesc->bCompressed ? TEXT("Yes") : TEXT("No"));
			OutputOverride->Logf(ELogVerbosity::Display, TEXT("\t\t           Signed: %s"), ContainerDesc->bSigned ? TEXT("Yes") : TEXT("No"));
			OutputOverride->Logf(ELogVerbosity::Display, TEXT("\t\t          Indexed: %s"), ContainerDesc->bIndexed ? TEXT("Yes") : TEXT("No"));
			if (ContainerDesc->bEncrypted)
			{
				OutputOverride->Logf(ELogVerbosity::Display, TEXT("\t\tEncryptionKeyGuid: %s"), *ContainerDesc->EncryptionKeyGuid.ToString());
			}

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:439

Scope (from outer to inner):

file
class        class FTurnkeySupportCallbacks
function     static void CookOrPackage

Source code excerpt:

				}

				if (PackagingSettings->bCompressed)
				{
					BuildCookRunParams += TEXT(" -compressed");
				}
			}

			if (PackagingSettings->IncludePrerequisites)

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ShaderPipelineCacheToolsCommandlet.cpp:983

Scope (from outer to inner):

file
function     bool SaveStablePipelineCacheDeprecated

Source code excerpt:

	}

	const bool bCompressed = OutputFilename.EndsWith(STABLE_CSV_COMPRESSED_EXT);

	FString CompressedFilename;
	FString UncompressedFilename;
	if (bCompressed)
	{
		CompressedFilename = OutputFilename;
		UncompressedFilename = CompressedFilename.LeftChop(STABLE_COMPRESSED_EXT_LEN); // remove the ".compressed"
	}
	else
	{

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ShaderPipelineCacheToolsCommandlet.cpp:2727

Scope (from outer to inner):

file
function     int32 DiffStable

Source code excerpt:

	{
		const FString& Filename = Tokens[TokenIndex];
		bool bCompressed = Filename.EndsWith(STABLE_CSV_COMPRESSED_EXT);
		if (!bCompressed && !Filename.EndsWith(STABLE_CSV_EXT))
		{
			check(0);
			continue;
		}
			   
		UE_LOG(LogShaderPipelineCacheTools, Display, TEXT("Loading %s...."), *Filename);

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:3880

Scope (from outer to inner):

file
function     void FLightmassProcessor::ApplyPrecomputedVisibility

Source code excerpt:

						FCompressedVisibilityChunk& NewChunk = OutputBucket.CellDataChunks.Last();
						NewChunk.UncompressedSize = UncompressedVisibilityData.Num();
						NewChunk.bCompressed = true;
						NewChunk.Data.Empty(CompressedSize);
						NewChunk.Data.AddUninitialized(CompressedSize);
						FMemory::Memcpy(NewChunk.Data.GetData(), TempCompressionOutput.GetData(), CompressedSize);
						ChunkIndex++;
						TotalCompressedSize += CompressedSize;
						UncompressedVisibilityData.Reset();

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:3893

Scope (from outer to inner):

file
function     void FLightmassProcessor::ApplyPrecomputedVisibility

Source code excerpt:

						FCompressedVisibilityChunk& NewChunk = OutputBucket.CellDataChunks.Last();
						NewChunk.UncompressedSize = UncompressedVisibilityData.Num();
						NewChunk.bCompressed = false;
						NewChunk.Data = UncompressedVisibilityData;
						ChunkIndex++;
						TotalCompressedSize += UncompressedVisibilityData.Num();
						UncompressedVisibilityData.Reset();
					}
				}

#Loc: <Workspace>/Engine/Source/Programs/Unsync/Private/UnsyncTarget.cpp:523

Scope (from outer to inner):

file
namespace    unsync
function     FBuildTargetResult BuildTarget
lambda-function

Source code excerpt:


					// TODO: avoid this copy by storing IOBuffer in DownloadedBlock
					bool	  bCompressed	 = Block.IsCompressed();
					uint64	  DownloadedSize = bCompressed ? Block.CompressedSize : Block.DecompressedSize;
					FIOBuffer DownloadedData = FIOBuffer::Alloc(DownloadedSize, L"downloaded_data");
					memcpy(DownloadedData.GetData(), Block.Data, DownloadedSize);

					DecompressionSemaphore.Acquire();

					DecompressTasks.run(

#Loc: <Workspace>/Engine/Source/Programs/Unsync/Private/UnsyncTarget.cpp:536

Scope (from outer to inner):

file
namespace    unsync
function     FBuildTargetResult BuildTarget
lambda-function
lambda-function

Source code excerpt:

						 DownloadedData	  = std::make_shared<FIOBuffer>(std::move(DownloadedData)),
						 DecompressedSize = Block.DecompressedSize,
						 bCompressed,
						 ParentThreadIndent,
						 StrongHasher,
						 &BlockScatterMap,
						 &DownloadedBlocksMutex,
						 &DownloadedBlocks,
						 &DecompressionSemaphore,

#Loc: <Workspace>/Engine/Source/Programs/Unsync/Private/UnsyncTarget.cpp:556

Scope (from outer to inner):

file
lambda-function
lambda-function

Source code excerpt:

							if (DecompressedSize == Cmd.Size)
							{
								if (bCompressed)
								{
									DecompressedData = FIOBuffer::Alloc(Cmd.Size, L"decompressed_data");

									bOk = Decompress(DownloadedData->GetData(),
													 DownloadedData->GetSize(),
													 DecompressedData.GetData(),

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IO/IoChunkEncoding.cpp:118

Scope (from outer to inner):

file
function     bool FIoChunkEncoding::Encode
lambda-function

Source code excerpt:


			int32 CompressedSize = int32(Block.Buffer.GetSize());
			const bool bCompressed = FCompression::CompressMemory(
				Params.CompressionFormat,
				Block.Buffer.GetData(),
				CompressedSize,
				RawBlock.GetData(),
				static_cast<int32>(RawBlock.GetSize()),
				COMPRESS_ForPackaging);

			if (bCompressed == false)
			{
				Block.Size = 0;
				return;
			}

			Block.Size = CompressedSize;

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IO/IoStore.cpp:1501

Scope (from outer to inner):

file
class        class FIoStoreWriter : public IIoStoreWriter
function     void CompressBlock

Source code excerpt:

		check(Block->CompressionMethod != NAME_None);
		int32 CompressedBlockSize = int32(Block->IoBuffer->DataSize());
		bool bCompressed;
		{
			bCompressed = FCompression::CompressMemoryIfWorthDecompressing(
				Block->CompressionMethod,
				WriterContext->WriterSettings.CompressionMinBytesSaved,
				WriterContext->WriterSettings.CompressionMinPercentSaved,
				Block->IoBuffer->Data(),
				CompressedBlockSize,
				Block->UncompressedData,

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IO/IoStore.cpp:1513

Scope (from outer to inner):

file
class        class FIoStoreWriter : public IIoStoreWriter
function     void CompressBlock

Source code excerpt:

				COMPRESS_ForPackaging);
		}
		if (!bCompressed)
		{
			Block->CompressionMethod = NAME_None;
			Block->CompressedSize = Block->UncompressedSize;
			FMemory::Memcpy(Block->IoBuffer->Data(), Block->UncompressedData, Block->UncompressedSize);
		}
		else

#Loc: <Workspace>/Engine/Source/Runtime/Datasmith/DatasmithCore/Private/DatasmithMeshSerialization.cpp:153

Scope (from outer to inner):

file
function     FMD5Hash FDatasmithPackedMeshes::Serialize

Source code excerpt:



FMD5Hash FDatasmithPackedMeshes::Serialize(FArchive& Ar, bool bCompressed)
{
	using namespace DatasmithMeshSerializationImpl;

	// structure          from
	// | Guard           | v0 | constant string, prevents loading of invalid buffers
	// | SerialVersion   | v0 | this structure versioning

#Loc: <Workspace>/Engine/Source/Runtime/Datasmith/DatasmithCore/Private/DatasmithMeshSerialization.cpp:179

Scope (from outer to inner):

file
function     FMD5Hash FDatasmithPackedMeshes::Serialize

Source code excerpt:


	enum EBufferType{ RawMeshDescription, CompressedMeshDescription };
	uint8 BufferType = bCompressed ? CompressedMeshDescription : RawMeshDescription;
	Ar << BufferType;

	FMD5Hash OutHash;
	if (Ar.IsLoading())
	{
		// versioning

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Level.h:187

Scope (from outer to inner):

file
class        class FCompressedVisibilityChunk

Source code excerpt:

public:
	/** Whether the chunk is compressed. */
	bool bCompressed;

	/** Size of the uncompressed chunk. */
	int32 UncompressedSize;

	/** Compressed visibility data if bCompressed is true. */
	TArray<uint8> Data;

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Level.h:197

Scope (from outer to inner):

file
class        class FCompressedVisibilityChunk
function     FArchive& operator<<

Source code excerpt:

	friend FArchive& operator<<( FArchive& Ar, FCompressedVisibilityChunk& D )
	{
		Ar << D.bCompressed << D.UncompressedSize << D.Data;
		return Ar;
	}
};

/** A bucket of visibility cells that have the same spatial hash. */
class FPrecomputedVisibilityBucket

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Classes/LandscapeTextureStorageProvider.h:27

Scope: file

Source code excerpt:

	/** Whether the bulk data is compressed or not */
	UPROPERTY()
	bool bCompressed = false;

	FByteBulkData BulkData;

	void Serialize(FArchive& Ar, UObject* Owner, uint32 SaveOverrideFlags);
};

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditInterface.cpp:5676

Scope (from outer to inner):

file
function     bool FLandscapeTextureDataInfo::UpdateTextureData

Source code excerpt:

bool FLandscapeTextureDataInfo::UpdateTextureData()
{
	const bool bCompressed = !Texture->CompressionNone;

	bool bNeedToWaitForUpdate = false;
	int32 DataSize = sizeof(FColor);
	if (Texture->GetPixelFormat() == PF_G8)
	{
		DataSize = sizeof(uint8);

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditInterface.cpp:5692

Scope (from outer to inner):

file
function     bool FLandscapeTextureDataInfo::UpdateTextureData

Source code excerpt:

		if (MipInfo[i].MipData && MipInfo[i].MipUpdateRegions.Num() > 0)
		{
			if (bCompressed)
			{
				bNeedToWaitForUpdate = true;
				// Cannot update regions on compressed textures so we will update the whole texture below.
				break;
			}

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeTextureStorageProvider.cpp:36

Scope (from outer to inner):

file
function     void FLandscapeTexture2DMipMap::Serialize

Source code excerpt:

	Ar << SizeX;
	Ar << SizeY;
	Ar << bCompressed;
	BulkData.SerializeWithFlags(Ar, Owner, SaveOverrideFlags);
}

template<typename T, typename F>
static bool SerializeArray(FArchive& Ar, TArray<T>& Array, F&& SerializeElementFn)
{

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeTextureStorageProvider.cpp:356

Scope (from outer to inner):

file
function     ULandscapeTextureStorageProviderFactory* ULandscapeTextureStorageProviderFactory::ApplyTo

Source code excerpt:

		if ((MipWidth <= UncompressedMipSizeThreshold) || (MipHeight <= UncompressedMipSizeThreshold))
		{
			Mip->bCompressed = false;
			CopyMipToBulkData(MipIndex, MipWidth, MipHeight, MipData.GetData(), MipData.Num(), Mip->BulkData);
		}
		else
		{
			Mip->bCompressed = true;
			CompressMipToBulkData(MipIndex, MipWidth, MipHeight, MipData.GetData(), MipData.Num(), Mip->BulkData);
		}

		MipWidth >>= 1;
		MipHeight >>= 1;
	}

#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeTextureStorageProvider.cpp:686

Scope (from outer to inner):

file
function     void ULandscapeTextureStorageProviderFactory::DecompressMip

Source code excerpt:

	FLandscapeTexture2DMipMap& Mip = Mips[MipIndex];

	if (!Mip.bCompressed)
	{
		// mip is uncompressed, just copy it
		check(SourceDataBytes == DestDataBytes);
		memcpy(DestData, SourceData, DestDataBytes);
		return;
	}

	check(Mip.bCompressed);

	int32 TotalPixels = Mip.SizeX * Mip.SizeY;
	check(SourceDataBytes == (TotalPixels + (Mip.SizeX + Mip.SizeY) * 2 - 4) * 2);
	check(DestDataBytes == TotalPixels * 4);

	// Undo Delta Encode of Heights

#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneCapture/Private/ImageSequenceProtocol.cpp:176

Scope (from outer to inner):

file
function     UImageSequenceProtocol_EXR::UImageSequenceProtocol_EXR

Source code excerpt:

{
	Format = EImageFormat::EXR;
	bCompressed = false;
	CaptureGamut = HCGM_Rec709;
}

bool UImageSequenceProtocol_EXR::SetupImpl()
{
	{

#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneCapture/Private/ImageSequenceProtocol.cpp:207

Scope (from outer to inner):

file
function     bool UImageSequenceProtocol_EXR::SetupImpl

Source code excerpt:

	if ( FParse::Value( FCommandLine::Get(), TEXT( "-HDRCompressionQuality=" ), HDRCompressionQuality ) )
	{
		bCompressed = HDRCompressionQuality != (int32)EImageCompressionQuality::Uncompressed;
	}

	EDisplayOutputFormat DisplayOutputFormat = HDRGetDefaultDisplayOutputFormat();
	EDisplayColorGamut DisplayColorGamut = HDRGetDefaultDisplayColorGamut();
	bool bHDREnabled = IsHDREnabled() && GRHISupportsHDROutput;

#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneCapture/Private/ImageSequenceProtocol.cpp:240

Scope (from outer to inner):

file
function     void UImageSequenceProtocol_EXR::AddFormatMappingsImpl

Source code excerpt:

void UImageSequenceProtocol_EXR::AddFormatMappingsImpl(TMap<FString, FStringFormatArg>& FormatMappings) const
{
	FormatMappings.Add(TEXT("quality"), bCompressed ? TEXT("Compressed") : TEXT("Uncompressed"));

	const TCHAR* GamutString = TEXT("");
	switch (CaptureGamut)
	{
		case HCGM_Rec709:  GamutString = TEXT("sRGB"); break;
		case HCGM_P3DCI:   GamutString = TEXT("P3D65"); break;

#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneCapture/Public/Protocols/ImageSequenceProtocol.h:134

Scope (from outer to inner):

file
class        class UImageSequenceProtocol_EXR : public UImageSequenceProtocol

Source code excerpt:

	/** Whether to write out compressed or uncompressed EXRs */
	UPROPERTY(config, EditAnywhere, Category=ImageSettings)
	bool bCompressed;

	/** The color gamut to use when storing HDR captured data. */
	UPROPERTY(config, EditAnywhere, Category=ImageSettings)
	TEnumAsByte<EHDRCaptureGamut> CaptureGamut;

	MOVIESCENECAPTURE_API UImageSequenceProtocol_EXR(const FObjectInitializer& ObjInit);

private:
	virtual int32 GetCompressionQuality() const override { return bCompressed ? (int32)EImageCompressionQuality::Default : (int32)EImageCompressionQuality::Uncompressed; }
	MOVIESCENECAPTURE_API virtual bool SetupImpl() override;
	MOVIESCENECAPTURE_API virtual void FinalizeImpl() override;
	MOVIESCENECAPTURE_API virtual void AddFormatMappingsImpl(TMap<FString, FStringFormatArg>& FormatMappings) const override;

	EDisplayColorGamut RestoreColorGamut;
	EDisplayOutputFormat RestoreOutputDevice;

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Private/LocalFileNetworkReplayStreaming.cpp:353

Scope (from outer to inner):

file
function     bool FLocalFileNetworkReplayStreamer::ReadReplayInfo

Source code excerpt:

				Archive << Compressed;

				Info.bCompressed = (Compressed != 0);
			}

			if (SerializationInfo.GetLocalFileReplayVersion() >= FLocalFileReplayCustomVersion::EncryptionSupport)
			{
				uint32 Encrypted;
				Archive << Encrypted;

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Private/LocalFileNetworkReplayStreaming.cpp:478

Scope (from outer to inner):

file
function     bool FLocalFileNetworkReplayStreamer::ReadReplayInfo

Source code excerpt:

						DataChunk.ReplayDataOffset = Archive.Tell();
	
						if (Info.bCompressed)
						{
							DataChunk.MemorySizeInBytes = GetDecompressedSizeBackCompat(Archive);
						}
						else
						{
							DataChunk.MemorySizeInBytes = DataChunk.SizeInBytes;

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Private/LocalFileNetworkReplayStreaming.cpp:2330

Scope (from outer to inner):

file
function     void FLocalFileNetworkReplayStreamer::GotoCheckpointIndex
lambda-function

Source code excerpt:

							TArray<uint8> UncompressedData;

							if (TaskReplayInfo.bCompressed)
							{
								if (SupportsCompression())
								{
									SCOPE_CYCLE_COUNTER(STAT_LocalReplay_DecompressTime);

									if (!DecompressBuffer(PlaintextData, UncompressedData))

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Private/LocalFileNetworkReplayStreaming.cpp:2513

Scope (from outer to inner):

file
function     void FLocalFileNetworkReplayStreamer::GotoCheckpointIndex
lambda-function

Source code excerpt:

					}

				if (TaskReplayInfo.bCompressed)
					{
						if (SupportsCompression())
						{
							SCOPE_CYCLE_COUNTER(STAT_LocalReplay_DecompressTime);

							TArray<uint8> UncompressedData;

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Private/LocalFileNetworkReplayStreaming.cpp:3427

Scope (from outer to inner):

file
function     void FLocalFileNetworkReplayStreamer::ConditionallyLoadNextChunk
lambda-function

Source code excerpt:

					}

				if (TaskReplayInfo.bCompressed)
					{
						if (SupportsCompression())
						{
							SCOPE_CYCLE_COUNTER(STAT_LocalReplay_DecompressTime);

							TArray<uint8> UncompressedData;

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Public/LocalFileNetworkReplayStreaming.h:143

Scope (from outer to inner):

file
function     FLocalFileReplayInfo

Source code excerpt:

		bIsLive(false),
		bIsValid(false),
		bCompressed(false),
		bEncrypted(false),
		HeaderChunkIndex(INDEX_NONE)
	{}

	int32 LengthInMS;
	uint32 NetworkVersion;

#Loc: <Workspace>/Engine/Source/Runtime/NetworkReplayStreaming/LocalFileNetworkReplayStreaming/Public/LocalFileNetworkReplayStreaming.h:156

Scope: file

Source code excerpt:

	bool bIsLive;
	bool bIsValid;
	bool bCompressed;

	bool bEncrypted;
	TArray<uint8> EncryptionKey;

	int32 HeaderChunkIndex;

#Loc: <Workspace>/Engine/Source/Runtime/Online/BuildPatchServices/Private/Generation/FileAttributesParser.cpp:10

Scope (from outer to inner):

file
namespace    BuildPatchServices
function     FFileAttributes::FFileAttributes

Source code excerpt:

	FFileAttributes::FFileAttributes()
		: bReadOnly(false)
		, bCompressed(false)
		, bUnixExecutable(false)
	{}

	class FFileAttributesParserImpl
		: public FFileAttributesParser
	{

#Loc: <Workspace>/Engine/Source/Runtime/Online/BuildPatchServices/Private/Generation/FileAttributesParser.cpp:37

Scope (from outer to inner):

file
namespace    BuildPatchServices
function     FFileAttributesParserImpl::FFileAttributesParserImpl
lambda-function

Source code excerpt:

	{
		AttributeSetters.Add(TEXT("readonly"),   [](FFileAttributes& Attributes, FString Value){ Attributes.bReadOnly = true; });
		AttributeSetters.Add(TEXT("compressed"), [](FFileAttributes& Attributes, FString Value){ Attributes.bCompressed = true; });
		AttributeSetters.Add(TEXT("executable"), [](FFileAttributes& Attributes, FString Value){ Attributes.bUnixExecutable = true; });
		AttributeSetters.Add(TEXT("tag"),        [](FFileAttributes& Attributes, FString Value){ Attributes.InstallTags.Add(MoveTemp(Value)); });
	}

	FFileAttributesParserImpl::~FFileAttributesParserImpl()
	{

#Loc: <Workspace>/Engine/Source/Runtime/Online/BuildPatchServices/Private/Generation/FileAttributesParser.h:9

Scope (from outer to inner):

file
namespace    BuildPatchServices

Source code excerpt:

	{
		bool bReadOnly;
		bool bCompressed;
		bool bUnixExecutable;
		TSet<FString> InstallTags;
		FFileAttributes();
	};

	class FFileAttributesParser

#Loc: <Workspace>/Engine/Source/Runtime/Online/BuildPatchServices/Private/Generation/ManifestBuilder.cpp:130

Scope (from outer to inner):

file
namespace    BuildPatchServices
function     bool FManifestBuilder::FinalizeData

Source code excerpt:

				FileManifest.FileMetaFlags |= EFileMetaFlags::ReadOnly;
			}
			if (FileAttributes.bCompressed)
			{
				FileManifest.FileMetaFlags |= EFileMetaFlags::Compressed;
			}
			if (FileAttributes.bUnixExecutable || FileSpan.IsUnixExecutable)
			{
				FileManifest.FileMetaFlags |= EFileMetaFlags::UnixExecutable;

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLDrvPrivate.h:304

Scope: file

Source code excerpt:

	GLenum Format = GL_NONE;
	GLenum Type = GL_NONE;
	bool bCompressed = false;
	// Reorder to B and R elements using texture swizzle
	bool bBGRA = false;

	FOpenGLTextureFormat() = default;

	FOpenGLTextureFormat(

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLDrvPrivate.h:318

Scope (from outer to inner):

file
function     FOpenGLTextureFormat

Source code excerpt:

		Format = InFormat;
		Type = InType;
		bCompressed = bInCompressed;
		bBGRA = bInBGRA;
	}
};

extern FOpenGLTextureFormat OPENGLDRV_API GOpenGLTextureFormats[PF_MAX];

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLProgramBinaryFileCache.h:62

Scope (from outer to inner):

file
class        class FOpenGLProgramBinaryCache

Source code excerpt:

		TArray<ANSICHAR> GlslCode;
		int32 UncompressedSize;
		bool bCompressed;
	};

private:
	static TAutoConsoleVariable<int32> CVarPBCEnable;
	static TAutoConsoleVariable<int32> CVarRestartAndroidAfterPrecompile;
	static FOpenGLProgramBinaryCache* CachePtr;

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLShaders.cpp:476

Scope (from outer to inner):

file
class        class FOpenGLCompiledShaderValue
function     void CompressShader

Source code excerpt:

		GlslCode.SetNumUninitialized(CompressedSize);

		bool bCompressed = FCompression::CompressMemory(
			CompressionMethod,
			(void*)GlslCode.GetData(),
			CompressedSize,
			(void*)InGlslCode.GetData(),
			UncompressedSize,
			COMPRESS_BiasSpeed);

		if (bCompressed)
		{
			// shrink buffer
			GlslCode.SetNum(CompressedSize, EAllowShrinking::Yes);
		}
		else
		{

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:489

Scope (from outer to inner):

file
function     void FOpenGLDynamicRHI::InitializeGLTexture

Source code excerpt:

		EPixelFormat PixelFormat = Texture->GetFormat();
		const FOpenGLTextureFormat& GLFormat = GOpenGLTextureFormats[PixelFormat];
		bool bIsCompressed = GLFormat.bCompressed;
		GTotalCompressedTexStorageSkipped += bIsCompressed ? 1 : 0;

		if (BulkDataPtr)
		{
			check(!GLFormat.bCompressed);
			const uint32 BlockSizeX = GPixelFormats[PixelFormat].BlockSizeX;
			const uint32 BlockSizeY = GPixelFormats[PixelFormat].BlockSizeY;

			uint8* Data = (uint8*)BulkDataPtr;
			uint32 MipOffset = 0;

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:682

Scope (from outer to inner):

file
lambda-function

Source code excerpt:

								return false;

							if (GLFormat.bCompressed)
							{
								glCompressedTexSubImage2D(
									CurrentTarget,
									MipIndex,
									0, 0, // X/Y offset
									MipSizeX, MipSizeY,

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:733

Scope (from outer to inner):

file
lambda-function

Source code excerpt:

								return false;

							if (GLFormat.bCompressed)
							{
								glCompressedTexSubImage3D(
									CurrentTarget,
									MipIndex,
									0, 0, ArraySlice, // X/Y/Z offset
									MipSizeX, MipSizeY, MipSizeZ,

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:837

Scope (from outer to inner):

file
function     void FOpenGLTexture::Resolve

Source code excerpt:

		else
		{
			if (GLFormat.bCompressed)
			{
				FOpenGL::GetCompressedTexImage(
											   bCubemap ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + ArrayIndex : Target,
											   MipIndex,
											   0);	// offset into PBO
			}

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:887

Scope (from outer to inner):

file
function     void FOpenGLTexture::Fill2DGLTextureImage

Source code excerpt:

void FOpenGLTexture::Fill2DGLTextureImage(const FOpenGLTextureFormat& GLFormat, const bool bSRGB, uint32 MipIndex, const void* BufferOrPBOOffset, uint32 ImageSize, uint32 ArrayIndex)
{
	if (GLFormat.bCompressed)
	{
		if (GetAllocatedStorageForMip(MipIndex,ArrayIndex))
		{
			glCompressedTexSubImage2D(
				bCubemap ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + ArrayIndex : Target,
				MipIndex,

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:1138

Scope (from outer to inner):

file
function     void FOpenGLTexture::Unlock

Source code excerpt:

		if (GetDesc().IsTextureArray() || GetDesc().IsTexture3D())
		{
			if (GLFormat.bCompressed)
			{
				FOpenGL::CompressedTexSubImage3D(
					Target,
					MipIndex,
					0,
					0,

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:1590

Scope (from outer to inner):

file
function     void FOpenGLDynamicRHI::RHIUpdateTexture2D
lambda-function

Source code excerpt:

		glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

		if (GLFormat.bCompressed)
		{
			glCompressedTexSubImage2D(
				Texture->Target,
				MipIndex,
				UpdateRegion.DestX, UpdateRegion.DestY,
				UpdateRegion.Width, UpdateRegion.Height,

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:1665

Scope (from outer to inner):

file
function     void FOpenGLDynamicRHI::RHIUpdateTexture3D
lambda-function

Source code excerpt:

		const bool bSRGB = EnumHasAnyFlags(Texture->GetFlags(), TexCreate_SRGB);

		if (GLFormat.bCompressed)
		{
			FOpenGL::CompressedTexSubImage3D(
				Texture->Target,
				MipIndex,
				UpdateRegion.DestX, UpdateRegion.DestY, UpdateRegion.DestZ,
				UpdateRegion.Width, UpdateRegion.Height, UpdateRegion.Depth,

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/PipelineCacheUtilities.cpp:555

Scope (from outer to inner):

file
function     bool UE::PipelineCacheUtilities::SaveStablePipelineCacheFile

Source code excerpt:


		int32 RealCompressedSize = CompressedSizeEstimate;
		const bool bCompressed = FCompression::CompressMemory(
			UE::PipelineCacheUtilities::Private::FStablePipelineCacheSerializedHeader::CompressionMethod,
			CompressedMemory.GetData(),
			RealCompressedSize,
			UncompressedMemory.GetData(),
			UncompressedMemory.Num());

		// if the compression results are worse, just store uncompressed data
		if (!bCompressed || RealCompressedSize >= UncompressedMemory.Num())
		{
			CompressedMemory = UncompressedMemory;
			Header.UncompressedSize = 0;
			Header.DataSize = UncompressedMemory.Num();
		}
		else

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/ShaderCore.cpp:3393

Scope (from outer to inner):

file
function     void FShaderCode::Compress

Source code excerpt:


	// non-Oodle format names use the old API, for NAME_Oodle we replace the call with the custom invocation
	bool bCompressed = false;
	if (ShaderCompressionFormat != NAME_Oodle)
	{
		bCompressed = FCompression::CompressMemory(ShaderCompressionFormat, Compressed.GetData(), CompressedSize, ShaderCodeWithOptionalData.GetData(), ShaderCodeWithOptionalData.Num(), COMPRESS_BiasSize);
	}
	else
	{
		CompressedSize = FOodleDataCompression::Compress(Compressed.GetData(), CompressedSize, ShaderCodeWithOptionalData.GetData(), ShaderCodeWithOptionalData.Num(),
			InOodleCompressor, InOodleLevel);
		bCompressed = CompressedSize != 0;
	}

	// there is code that assumes that if CompressedSize == CodeSize, the shader isn't compressed. Because of that, do not accept equal compressed size (very unlikely anyway)
	if (bCompressed && CompressedSize < ShaderCodeWithOptionalData.Num())
	{
		// cache the ShaderCodeSize since it will no longer possible to get it as the reader will fail to parse the compressed data
		FShaderCodeReader Wrapper(ShaderCodeWithOptionalData);
		ShaderCodeSize = Wrapper.GetShaderCodeSize();
		checkf(ShaderCodeSize >= 0, TEXT("Unable to determine ShaderCodeSize from uncompressed code"), ShaderCodeSize);

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenSurfaceCache.cpp:126

Scope: file

Source code excerpt:

	const FLumenSurfaceLayerConfig& Config = GetSurfaceLayerConfig(LayerId);
	ETextureCreateFlags TexFlags = TexCreate_ShaderResource | TexCreate_NoFastClear;
	const bool bCompressed = PhysicalAtlasCompression != ESurfaceCacheCompression::Disabled && Config.CompressedFormat != PF_Unknown;

	// Without compression we can write directly into this surface
	if (!bCompressed)
	{
		TexFlags |= TexCreate_RenderTargetable;
	}

	FRDGTextureDesc CreateInfo = FRDGTextureDesc::Create2D(
		PageAtlasSize,
		bCompressed ? Config.CompressedFormat : Config.UncompressedFormat,
		FClearValueBinding::None,
		TexFlags);

	// With UAV aliasing we can directly write into a BC target by overriding UAV format
	if (PhysicalAtlasCompression == ESurfaceCacheCompression::UAVAliasing && Config.CompressedFormat != PF_Unknown)
	{

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneOcclusion.cpp:211

Scope (from outer to inner):

file
function     const uint8* FSceneViewState::GetPrecomputedVisibilityData

Source code excerpt:

					CachedVisibilityHandlerId = InScene->PrecomputedVisibilityHandler->GetId();

					if (CompressedChunk.bCompressed)
					{
						// Decompress the needed visibility data chunk
						DecompressedVisibilityChunk.Reset();
						DecompressedVisibilityChunk.AddUninitialized(CompressedChunk.UncompressedSize);
						verify(FCompression::UncompressMemory(
							NAME_Zlib, 

#References in C# build files

This variable is referenced in the following C# build files:

Location: <Workspace>/Engine/Source/Programs/AutomationTool/Scripts/CopyBuildToStagingDirectory.Automation.cs:2945

			// if ProjectPackagingSettings/bCompressed is true but you really don't want compression, use "-forceuncompressed"
			bool bCompressed_ProjectPackagingSettings = false;
			PlatformGameConfig.GetBool("/Script/UnrealEd.ProjectPackagingSettings", "bCompressed", out bCompressed_ProjectPackagingSettings);

			bool bForceUseProjectCompressionFormatIgnoreHardwareOverride = false;// do we want to override HW compression with project? if so, read it below
			PlatformGameConfig.GetBool("/Script/UnrealEd.ProjectPackagingSettings", "bForceUseProjectCompressionFormatIgnoreHardwareOverride", out bForceUseProjectCompressionFormatIgnoreHardwareOverride);

			string HardwareCompressionFormat = null;
			if ( ! bForceUseProjectCompressionFormatIgnoreHardwareOverride )