261 references to SR
System.IO.Compression (261)
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (7)
277ErrorCode.MemError => SR.ZLibErrorNotEnoughMemory, 280ErrorCode.VersionError => SR.ZLibErrorVersionMismatch, 283ErrorCode.StreamError => SR.ZLibErrorIncorrectInitParameters, 285_ => SR.Format(SR.ZLibErrorUnexpected, (int)zlibErrorCode) 311throw new ZLibException(SR.ZLibErrorDLLLoadError, e); 407throw new ZLibException(SR.ZLibErrorDLLLoadError, e);
src\runtime\src\libraries\Common\src\System\IO\SubReadStream.cs (7)
32throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(superStream)); 65throw new NotSupportedException(SR.IO_NotSupported_UnseekableStream); 166throw new NotSupportedException(SR.IO_NotSupported_UnreadableStream); 248throw new NotSupportedException(SR.IO_NotSupported_UnseekableStream); 261throw new IOException(SR.IO_SeekBeforeBegin); 270public override void SetLength(long value) => throw new NotSupportedException(SR.IO_NotSupported_UnwritableStream); 272public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException(SR.IO_NotSupported_UnwritableStream);
System\IO\Compression\DeflateEncoder.cs (2)
226_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode, _state.GetErrorMessage()) 281_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode, _state.GetErrorMessage())
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (11)
28throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream)); 63get { throw new NotSupportedException(SR.NotSupported); } 68get { throw new NotSupportedException(SR.NotSupported); } 69set { throw new NotSupportedException(SR.NotSupported); } 87throw new NotSupportedException(SR.NotSupported); 92throw new NotSupportedException(SR.NotSupported); 134throw new InvalidDataException(SR.GenericInvalidData); 221throw new InvalidDataException(SR.GenericInvalidData); 252throw new InvalidOperationException(SR.InvalidBeginCall); 264throw new InvalidOperationException(SR.InvalidBeginCall); 273throw new InvalidOperationException(SR.CannotWriteToDeflateStream);
System\IO\Compression\DeflateManaged\HuffmanTree.cs (4)
200throw new InvalidDataException(SR.InvalidHuffmanData); 242throw new InvalidDataException(SR.InvalidHuffmanData); 262throw new InvalidDataException(SR.InvalidHuffmanData); 313throw new InvalidDataException(SR.InvalidHuffmanData);
System\IO\Compression\DeflateManaged\InflaterManaged.cs (8)
218throw new InvalidDataException(SR.UnknownBlockType); 244throw new InvalidDataException(SR.UnknownBlockType); 303throw new InvalidDataException(SR.InvalidBlockLength); 336throw new InvalidDataException(SR.UnknownState); 400throw new InvalidDataException(SR.GenericInvalidData); 422throw new InvalidDataException(SR.GenericInvalidData); 480throw new InvalidDataException(SR.UnknownState); 672throw new InvalidDataException(SR.UnknownState);
System\IO\Compression\DeflateZLib\Deflater.cs (3)
209throw new ZLibException(SR.ZLibErrorDLLLoadError, cause); 222throw new ZLibException(SR.ZLibErrorInconsistentStream, "deflate", (int)errC, _zlibStream.GetErrorMessage()); 225throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errC, _zlibStream.GetErrorMessage());
System\IO\Compression\DeflateZLib\DeflateStream.cs (15)
86throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream)); 99throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 121throw new ArgumentException(SR.NotSupported_UnwritableStream, nameof(stream)); 201get { throw new NotSupportedException(SR.NotSupported); } 206get { throw new NotSupportedException(SR.NotSupported); } 207set { throw new NotSupportedException(SR.NotSupported); } 264throw new NotSupportedException(SR.NotSupported); 269throw new NotSupportedException(SR.NotSupported); 403throw new InvalidOperationException(SR.CannotReadFromDeflateStream); 412throw new InvalidOperationException(SR.CannotWriteToDeflateStream); 418throw new InvalidDataException(SR.GenericInvalidData); 421throw new InvalidDataException(SR.TruncatedData); 1118return Task.FromException(new InvalidDataException(SR.GenericInvalidData)); 1177throw new InvalidDataException(SR.GenericInvalidData); 1244throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\DeflateZLib\Inflater.cs (5)
339throw new ZLibException(SR.ZLibErrorDLLLoadError, cause); 351throw new ZLibException(SR.ZLibErrorNotEnoughMemory, "inflate_", (int)errC, _zlibStream.GetErrorMessage()); 354throw new InvalidDataException(SR.UnsupportedCompression); 357throw new ZLibException(SR.ZLibErrorInconsistentStream, "inflate_", (int)errC, _zlibStream.GetErrorMessage()); 360throw new ZLibException(SR.ZLibErrorUnexpected, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
System\IO\Compression\GZipStream.cs (5)
60get { throw new NotSupportedException(SR.NotSupported); } 65get { throw new NotSupportedException(SR.NotSupported); } 66set { throw new NotSupportedException(SR.NotSupported); } 77throw new NotSupportedException(SR.NotSupported); 82throw new NotSupportedException(SR.NotSupported);
System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.cs (7)
30set { throw new NotSupportedException(SR.NotSupported); } 100get { throw new NotSupportedException(SR.NotSupported); } 105throw new NotSupportedException(SR.NotSupported); 110throw new NotSupportedException(SR.NotSupported); 113public override int Read(byte[] buffer, int offset, int count) => throw new NotSupportedException(SR.NotSupported); 115public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => throw new NotSupportedException(SR.NotSupported); 117public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default) => throw new NotSupportedException(SR.NotSupported);
System\IO\Compression\WinZipAesKeyMaterial.cs (2)
29throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 46throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform);
System\IO\Compression\WinZipAesStream.cs (15)
46throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 59throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 71throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 91throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 111throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 141throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 148throw new InvalidDataException(SR.InvalidPassword); 160throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 191throw new InvalidDataException(SR.InvalidWinZipSize); 215throw new InvalidDataException(SR.WinZipAuthCodeMismatch); 222throw new InvalidDataException(SR.WinZipAuthCodeMismatch); 378throw new NotSupportedException(SR.ReadingNotSupported); 431throw new InvalidDataException(SR.UnexpectedEndOfStream); 476throw new InvalidDataException(SR.UnexpectedEndOfStream); 504throw new NotSupportedException(SR.WritingNotSupported);
System\IO\Compression\ZipArchive.Async.cs (6)
257throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 287throw new InvalidDataException(SR.EOCDNotFound); 300throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 305throw new InvalidDataException(SR.CDCorrupt, ex); 309throw new InvalidDataException(SR.CDCorrupt, ex); 331throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected);
System\IO\Compression\ZipArchive.cs (25)
234throw new NotSupportedException(SR.EntriesInCreateMode); 399throw new NotSupportedException(SR.EntriesInCreateMode); 436throw new ArgumentException(SR.EntryNameAndCommentEncodingNotSupported, nameof(EntryNameAndCommentEncoding)); 488throw new NotSupportedException(SR.CreateInReadMode); 514throw new IOException(SR.CreateModeCreateEntryWhileOpen); 616throw new InvalidDataException(SR.NumEntriesWrong); 640throw new InvalidDataException(SR.NumEntriesWrong); 703throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 715throw new InvalidDataException(SR.SplitSpanned); 723throw new InvalidDataException(SR.SplitSpanned); 736throw new InvalidDataException(SR.EmptyArchiveStream); 741throw new InvalidDataException(SR.EOCDNotFound); 764throw new InvalidDataException(SR.EOCDNotFound); 777throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 782throw new InvalidDataException(SR.CDCorrupt, ex); 786throw new InvalidDataException(SR.CDCorrupt, ex); 794throw new InvalidDataException(SR.FieldTooBigOffsetToZip64EOCD); 801throw new InvalidDataException(SR.InvalidOffsetToZip64EOCD); 813throw new InvalidDataException(SR.FieldTooBigNumEntries); 818throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 823throw new InvalidDataException(SR.SplitSpanned); 846throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 1080throw new ArgumentException(SR.CreateModeCapabilities); 1086throw new ArgumentException(SR.ReadModeCapabilities); 1096throw new ArgumentException(SR.UpdateModeCapabilities);
System\IO\Compression\ZipArchiveEntry.Async.cs (24)
83throw new ArgumentException(SR.PasswordRequired, nameof(password)); 110throw new ArgumentException(SR.PasswordRequired, nameof(password)); 133throw new ArgumentException(SR.PasswordRequired, nameof(password)); 165throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 231throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 236throw new InvalidDataException(SR.PasswordRequired); 243throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 248throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 261throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 307throw new IOException(SR.UpdateModeOneStream); 312throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 349throw new IOException(SR.UpdateModeOneStream); 366throw new InvalidDataException(SR.EntryUncompressedSizeTooLargeForUpdateMode); 515throw new IOException(SR.UpdateModeOneStream); 520throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 527throw new ArgumentException(SR.PasswordRequired, nameof(password)); 542throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 547throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 562throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 586throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform); 613throw new InvalidDataException(SR.EntryTooLarge); 662message = SR.LocalFileHeaderCorrupt; 673message = SR.LocalFileHeaderCorrupt; 796throw new PlatformNotSupportedException(SR.WinZipEncryptionNotSupportedOnPlatform);
System\IO\Compression\ZipArchiveEntry.cs (49)
87throw new InvalidDataException(SR.InvalidAesExtraField); 100_ => throw new InvalidDataException(SR.InvalidAesStrength) 208throw new ArgumentException(SR.EntryNamesTooLong); 275throw new InvalidOperationException(SR.LengthAfterWrite); 384throw new NotSupportedException(SR.ReadOnlyArchive); 388throw new IOException(SR.FrozenAfterWrite); 392throw new ArgumentOutOfRangeException(nameof(value), SR.DateTimeOutOfRange); 410throw new InvalidOperationException(SR.LengthAfterWrite); 451throw new IOException(SR.DeleteOpenEntry); 456throw new NotSupportedException(SR.DeleteOnlyInUpdate); 496throw new ArgumentException(SR.PasswordRequired, nameof(password)); 534throw new ArgumentException(SR.PasswordRequired, nameof(password)); 551throw new ArgumentOutOfRangeException(nameof(access), SR.InvalidFileAccess); 559throw new InvalidOperationException(SR.CannotBeWrittenInReadMode); 565throw new InvalidOperationException(SR.CannotBeReadInCreateMode); 626throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 692throw new InvalidDataException(SR.EntryUncompressedSizeTooLargeForUpdateMode); 1085throw new NotSupportedException(SR.ZipCryptoLastWriteTimeChangeNotSupported); 1103_ => throw new InvalidDataException(SR.InvalidAesStrength) 1115throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 1120throw new InvalidDataException(SR.PasswordRequired); 1127throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 1146throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 1225throw new IOException(SR.CreateModeWriteOnceAndOneEntryAtATime); 1249?? throw new InvalidOperationException(SR.EmptyPassword); 1265?? throw new InvalidOperationException(SR.EmptyPassword); 1297throw new IOException(SR.UpdateModeOneStream); 1302throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 1309throw new ArgumentException(SR.PasswordRequired, nameof(password)); 1352throw new IOException(SR.UpdateModeOneStream); 1401throw new ArgumentException(SR.EmptyPassword, nameof(password)); 1419throw new ArgumentOutOfRangeException(nameof(encryptionMethod), encryptionMethod, SR.EncryptionNotSpecified); 1440_ => throw new InvalidDataException(SR.InvalidAesStrength) 1461message = SR.LocalFileHeaderCorrupt; 1472message = SR.LocalFileHeaderCorrupt; 1503message = SR.UnsupportedCompression; 1509message = SR.SplitSpanned; 1514message = SR.LocalFileHeaderCorrupt; 1531message = SR.LocalFileHeaderCorrupt; 1544message = SR.EntryTooLarge; 2263throw new InvalidOperationException(SR.DeletedEntry); 2322throw new NotSupportedException(SR.SeekingNotSupported); 2335throw new NotSupportedException(SR.SeekingNotSupported); 2347throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 2354throw new NotSupportedException(SR.ReadingNotSupported); 2360throw new NotSupportedException(SR.ReadingNotSupported); 2366throw new NotSupportedException(SR.ReadingNotSupported); 2372throw new NotSupportedException(SR.SeekingNotSupported); 2378throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting);
System\IO\Compression\ZipBlocks.Async.cs (2)
113throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 270throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipBlocks.cs (5)
317throw new InvalidDataException(SR.FieldTooBigUncompressedSize); 336throw new InvalidDataException(SR.FieldTooBigCompressedSize); 355throw new InvalidDataException(SR.FieldTooBigLocalHeaderOffset); 592throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 1239throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipCryptoStream.cs (6)
230throw new InvalidDataException(SR.TruncatedZipCryptoHeader); 244throw new InvalidDataException(SR.InvalidPassword); 298throw new NotSupportedException(SR.ReadingNotSupported); 321throw new NotSupportedException(SR.WritingNotSupported); 404throw new NotSupportedException(SR.ReadingNotSupported); 430throw new NotSupportedException(SR.WritingNotSupported);
System\IO\Compression\ZipCustomStreams.cs (21)
76throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 82throw new NotSupportedException(SR.ReadingNotSupported); 88throw new NotSupportedException(SR.WritingNotSupported); 94throw new NotSupportedException(SR.SeekingNotSupported); 305throw new NotSupportedException(SR.SeekingNotSupported); 319throw new NotSupportedException(SR.SeekingNotSupported); 332throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 338throw new NotSupportedException(SR.ReadingNotSupported); 344throw new NotSupportedException(SR.ReadingNotSupported); 350throw new NotSupportedException(SR.ReadingNotSupported); 356throw new NotSupportedException(SR.SeekingNotSupported); 362throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting); 626throw new InvalidDataException(SR.UnexpectedStreamLength); 643throw new InvalidDataException(SR.UnexpectedStreamLength); 656throw new InvalidDataException(SR.CrcMismatch); 675throw new NotSupportedException(SR.WritingNotSupported); 681throw new NotSupportedException(SR.WritingNotSupported); 687throw new NotSupportedException(SR.WritingNotSupported); 714throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting); 721throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 729throw new NotSupportedException(SR.SeekingNotSupported);
System\IO\Compression\Zstandard\ZstandardDecoder.cs (1)
388throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System\IO\Compression\Zstandard\ZstandardDictionary.cs (8)
44throw new ArgumentException(SR.ZstandardDictionary_EmptyBuffer, nameof(buffer)); 59throw new IOException(SR.ZstandardDictionary_CreateCompressionFailed); 68throw new IOException(SR.ZstandardDictionary_CreateDecompressionFailed); 103throw new ArgumentException(SR.ZstandardDictionary_EmptyBuffer, nameof(samples)); 109throw new ArgumentException(SR.Format(SR.ZstandardDictionary_Train_MinimumSampleCount, 5), nameof(sampleLengths)); 132throw new ArgumentException(SR.ZstandardDictionary_Train_InvalidSampleLength, nameof(sampleLengths)); 144throw new ArgumentException(SR.ZstandardDictionary_SampleLengthsMismatch, nameof(sampleLengths));
System\IO\Compression\Zstandard\ZstandardEncoder.cs (2)
436throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState); 464throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (6)
104throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 116throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 155throw new InvalidDataException(SR.ZstandardStream_Compress_InvalidData); 177throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 216throw new InvalidDataException(SR.ZstandardStream_Compress_InvalidData); 299throw new InvalidOperationException(SR.CannotWriteToDecompressionStream);
System\IO\Compression\Zstandard\ZstandardStream.cs (4)
37throw new ArgumentException(SR.Stream_FalseCanWrite, nameof(stream)); 44throw new ArgumentException(SR.Stream_FalseCanRead, nameof(stream)); 49throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 255throw new InvalidOperationException(SR.ZstandardStream_ConcurrentRWOperation);
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (5)
79throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidData); 148throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 322throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 455throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidStream); 459throw new InvalidDataException(SR.ZstandardStream_Decompress_TruncatedData);
System\IO\Compression\Zstandard\ZstandardUtils.cs (6)
88return new IOException(SR.ZstandardDecoder_WindowTooLarge); 91return new InvalidDataException(SR.ZstandardDecoder_DictionaryWrong); 97return new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState); 100return new IOException(SR.Format(SR.Zstd_InternalError, GetErrorMessage(error))); 114_ => throw new ArgumentOutOfRangeException(nameof(compressionLevel), compressionLevel, SR.ArgumentOutOfRange_Enum)