docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PackedBinaryStream

    Output stream for deserialization. This stream is used to retain relevant data parsed during deserialization.

    Implements
    IDisposable
    IEquatable<PackedBinaryStream>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Serialization.Json
    Assembly: Unity.Serialization.dll
    Syntax
    public struct PackedBinaryStream : IDisposable, IEquatable<PackedBinaryStream>
    Remarks

    The contents of the stream are not actualized and instead remain as a string of characters.

    Constructors

    PackedBinaryStream(int, int, Allocator)

    Constructs a new instance of PackedBinaryStream using the given capacities.

    Declaration
    public PackedBinaryStream(int initialTokensCapacity, int initialBufferCapacity, Allocator label)
    Parameters
    Type Name Description
    int initialTokensCapacity

    Initial number of tokens to allocate.

    int initialBufferCapacity

    Initial buffer size to allocate.

    Allocator label

    Allocator to use for internal buffers.

    PackedBinaryStream(Allocator)

    Constructs a new instance of PackedBinaryStream using default capacities.

    Declaration
    public PackedBinaryStream(Allocator label)
    Parameters
    Type Name Description
    Allocator label

    The memory allocator label to use.

    Methods

    Clear()

    Clears all token and buffer data.

    Declaration
    public void Clear()

    Dispose()

    Releases all resources used by the PackedBinaryStream.

    Declaration
    public void Dispose()

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    Equals(PackedBinaryStream)

    Declaration
    public bool Equals(PackedBinaryStream other)
    Parameters
    Type Name Description
    PackedBinaryStream other
    Returns
    Type Description
    bool

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    Implements

    IDisposable
    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)