コード例 #1
0
        public Base85Codec(Base85Settings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            Settings = settings.ToReadOnly();
        }
コード例 #2
0
            public Encoder(Base85Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                _encoder = new Base85Encoder(settings);
            }
コード例 #3
0
        public Base85Settings(Base85Settings inheritedSettings)
            : this(true)
        {
            if (inheritedSettings == null)
            {
                throw new ArgumentNullException(nameof(inheritedSettings));
            }

            InheritSettings(inheritedSettings);

            _yCharacter = inheritedSettings._yCharacter;
            _zCharacter = inheritedSettings._zCharacter;
        }
コード例 #4
0
            public Base85Decoder(Base85Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                // initialize fields to defaults..
                this = default;

                settings.GetDecoderSettings(
                    out _decodingTable,
                    out _decodingAffixTable,
                    out _decodingPrefixes,
                    out _decodingPostfixes,
                    out _flags
                    );

                Reset();
            }
コード例 #5
0
            public Base85Encoder(Base85Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                // initialize to defaults..
                this = default;

                settings.GetEncoderSettings(
                    out _alphabet,
                    out _flags,
                    out _lineSeparator,
                    out _maximumLineLength,
                    out _initialAffix,
                    out _finalAffix,
                    out _charZ,
                    out _charY
                    );

                Reset();
            }
コード例 #6
0
 private Base85Settings(Base85Settings inheritedSettings, bool isProtected)
     : this(inheritedSettings)
 {
     IsProtected = isProtected;
 }
コード例 #7
0
 public Decoder(Base85Settings settings)
 {
     _codecDecoder = new Base85Decoder(settings);
 }