• 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

Interface ICompressor

Defines methods for compressing and decompressing network packets.

Namespace: SuperNet.Netcode.Compress
Assembly: cs.temp.dll.dll
Syntax
public interface ICompressor : IDisposable

Methods

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

Compress data.

Declaration
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
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.

MaxCompressedLength(Int32)

Compute the maximum compressed length before compressing.

Declaration
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.

Back to top Generated by DocFX