• Home
  • Tutorials
  • API Documentation
  • Asset Store
Show / Hide Table of Contents
  • SuperNet.Netcode.Compress
    • CompressorDeflate
    • CompressorLZF
    • ICompressor
  • SuperNet.Netcode.Crypto
    • CryptoAES
    • CryptoECDH
    • CryptoRandom
    • CryptoRSA
    • Curve25519
    • ICryptoAuthenticator
    • ICryptoEncryptor
    • ICryptoExchanger
    • ICryptoRandom
  • SuperNet.Netcode.Transport
    • ConnectionRequest
    • DisconnectReason
    • Host
    • HostConfig
    • HostEvents
    • HostStatistics
    • HostTimespan
    • HostTimestamp
    • IHostListener
    • IMessage
    • IMessageListener
    • IPeerListener
    • MessageEvents
    • MessageReceived
    • MessageSent
    • Peer
    • PeerConfig
    • PeerEvents
    • PeerStatistics
  • SuperNet.Netcode.Util
    • Allocator
    • ArrayPool<T>
    • CRC32
    • IPComparer
    • IPResolver
    • IWritable
    • ObjectPool<T>
    • Reader
    • Serializer
    • Writer
  • SuperNet.Unity.Components
    • INetworkAuthoritative
    • INetworkRegisterable
    • INetworkRollbackable
    • NetworkAnimation
    • NetworkAnimator
    • NetworkAuthority
    • NetworkPrefab
    • NetworkRegistrar
    • NetworkSpawner
    • NetworkSyncModeMethod
    • NetworkSyncModeVector2
    • NetworkSyncModeVector3
    • NetworkTransform
  • SuperNet.Unity.Core
    • NetworkComponent
    • NetworkHost
    • NetworkIdentity
    • NetworkIdentityExtensions
    • NetworkManager
  • SuperNet.Unity.Editor
    • NetworkAuthorityEditor
    • NetworkHostEditor
    • NetworkHostEditor.BandwithUnit
    • NetworkIdentityDrawer
    • NetworkManagerEditor
    • NetworkPrefabEditor
    • NetworkSpawnerEditor

Class CompressorDeflate

Compression based on the DEFLATE algorithm.

Inheritance
System.Object
CompressorDeflate
Implements
ICompressor
IDisposable
Namespace: SuperNet.Netcode.Compress
Assembly: cs.temp.dll.dll
Syntax
public sealed class CompressorDeflate : ICompressor, IDisposable

Constructors

CompressorDeflate(Allocator)

Create a new DEFLATE compressor.

Declaration
public CompressorDeflate(Allocator allocator)
Parameters
Type Name Description
Allocator allocator

Allocator to use for resizing buffers.

Methods

Compress(ArraySegment<Byte>, Byte[], Int32)

Compress data.

Declaration
public int Compress(ArraySegment<byte> input, byte[] output, int offset)
Parameters
Type Name Description
ArraySegment<System.Byte> input

Array segment to compress.

System.Byte[] output

Output buffer to write to.

System.Int32 offset

Output offset to write to.

Returns
Type Description
System.Int32

Total number of bytes written to the output.

Decompress(ArraySegment<Byte>, ref Byte[], Int32)

Decompress data and resize output if needed.

Declaration
public int Decompress(ArraySegment<byte> input, ref byte[] output, int offset)
Parameters
Type Name Description
ArraySegment<System.Byte> input

Array segment to decompress.

System.Byte[] output

Output buffer to write to.

System.Int32 offset

Output offset to write to.

Returns
Type Description
System.Int32

Total number of bytes written to the output.

Dispose()

Instantly dispose of all resources.

Declaration
public void Dispose()

MaxCompressedLength(Int32)

Compute the maximum compressed length before compressing.

Declaration
public int MaxCompressedLength(int inputLength)
Parameters
Type Name Description
System.Int32 inputLength

Length of the uncompressed input.

Returns
Type Description
System.Int32

Maximum possible compressed length.

Implements

ICompressor
IDisposable
Back to top Generated by DocFX