Export (0) Print
Expand All

ContentTypeWriter.ShouldCompressContent Method

Ff434460.note(en-us,XNAGameStudio.41).gifNote
This method is available only when developing for Windows.
Indicates whether a given type of content should be compressed.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

protected internal virtual bool ShouldCompressContent (
         TargetPlatform targetPlatform,
         Object value
)

Parameters

targetPlatform
Type: TargetPlatform
The target platform of the content build.
value
Type: Object
The object about to be serialized, or null if a collection of objects is to be serialized.

Return Value

true if the content of the requested type should be compressed; false otherwise.

This base class implementation of this method always returns true. It should be overridden to return false if there would be little or no useful reduction in size of the content type's data from a general-purpose lossless compression algorithm.

The implementations for Song Class and SoundEffect Class data return false because data for these content types is already in compressed form.

Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show:
© 2014 Microsoft