ContentTypeWriter.ShouldCompressContent Method
Note
This method is available only when developing for Windows.
Indicates whether a given type of content should be compressed.
Syntax
'Declaration
Protected Internal Overridable Function ShouldCompressContent ( _
targetPlatform As TargetPlatform, _
value As Object _
) As Boolean
protected internal virtual bool ShouldCompressContent (
TargetPlatform targetPlatform,
Object value
)
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
Type: Boolean
true if the content of the requested type should be compressed; false otherwise.
Remarks
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.
Requirements
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
See Also
Reference
ContentTypeWriter Class
ContentTypeWriter Members
Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler Namespace
Platforms
Windows 7, Windows Vista, Windows XP