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

            Settings = settings.ToReadOnly();
        }
            public Encoder(Base85Settings settings)
            {
                if (settings == null)
                {
                    throw new ArgumentNullException(nameof(settings));
                }

                _encoder = new Base85Encoder(settings);
            }
        public Base85Settings(Base85Settings inheritedSettings)
            : this(true)
        {
            if (inheritedSettings == null)
            {
                throw new ArgumentNullException(nameof(inheritedSettings));
            }

            InheritSettings(inheritedSettings);

            _yCharacter = inheritedSettings._yCharacter;
            _zCharacter = inheritedSettings._zCharacter;
        }
            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();
            }
            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();
            }
 private Base85Settings(Base85Settings inheritedSettings, bool isProtected)
     : this(inheritedSettings)
 {
     IsProtected = isProtected;
 }
示例#7
0
 public Decoder(Base85Settings settings)
 {
     _codecDecoder = new Base85Decoder(settings);
 }