256 references to SR
System.IO.Compression (256)
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) 307throw new ZLibException(SR.ZLibErrorDLLLoadError, e); 386throw 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)
225_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode, _state.GetErrorMessage()) 279_ => 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)
191throw new InvalidDataException(SR.InvalidHuffmanData); 233throw new InvalidDataException(SR.InvalidHuffmanData); 253throw new InvalidDataException(SR.InvalidHuffmanData); 304throw 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)
179throw new ZLibException(SR.ZLibErrorDLLLoadError, cause); 192throw new ZLibException(SR.ZLibErrorInconsistentStream, "deflate", (int)errC, _zlibStream.GetErrorMessage()); 195throw 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); 393throw new InvalidOperationException(SR.CannotReadFromDeflateStream); 402throw new InvalidOperationException(SR.CannotWriteToDeflateStream); 408throw new InvalidDataException(SR.GenericInvalidData); 411throw new InvalidDataException(SR.TruncatedData); 1038return Task.FromException(new InvalidDataException(SR.GenericInvalidData)); 1087throw new InvalidDataException(SR.GenericInvalidData); 1144throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\DeflateZLib\Inflater.cs (5)
259throw new ZLibException(SR.ZLibErrorDLLLoadError, cause); 271throw new ZLibException(SR.ZLibErrorNotEnoughMemory, "inflate_", (int)errC, _zlibStream.GetErrorMessage()); 274throw new InvalidDataException(SR.UnsupportedCompression); 277throw new ZLibException(SR.ZLibErrorInconsistentStream, "inflate_", (int)errC, _zlibStream.GetErrorMessage()); 280throw 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); 210throw new InvalidDataException(SR.WinZipAuthCodeMismatch); 217throw new InvalidDataException(SR.WinZipAuthCodeMismatch); 373throw new NotSupportedException(SR.ReadingNotSupported); 426throw new InvalidDataException(SR.UnexpectedEndOfStream); 471throw new InvalidDataException(SR.UnexpectedEndOfStream); 499throw new NotSupportedException(SR.WritingNotSupported);
System\IO\Compression\ZipArchive.Async.cs (6)
257throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 285throw new InvalidDataException(SR.EOCDNotFound); 298throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 303throw new InvalidDataException(SR.CDCorrupt, ex); 307throw new InvalidDataException(SR.CDCorrupt, ex); 329throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected);
System\IO\Compression\ZipArchive.cs (23)
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); 748throw new InvalidDataException(SR.EOCDNotFound); 761throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 766throw new InvalidDataException(SR.CDCorrupt, ex); 770throw new InvalidDataException(SR.CDCorrupt, ex); 778throw new InvalidDataException(SR.FieldTooBigOffsetToZip64EOCD); 785throw new InvalidDataException(SR.InvalidOffsetToZip64EOCD); 797throw new InvalidDataException(SR.FieldTooBigNumEntries); 802throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 807throw new InvalidDataException(SR.SplitSpanned); 830throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 1039throw new ArgumentException(SR.CreateModeCapabilities); 1045throw new ArgumentException(SR.ReadModeCapabilities); 1055throw 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 (47)
96_ => throw new InvalidDataException(SR.InvalidAesStrength) 200throw new ArgumentException(SR.EntryNamesTooLong); 267throw new InvalidOperationException(SR.LengthAfterWrite); 370throw new NotSupportedException(SR.ReadOnlyArchive); 374throw new IOException(SR.FrozenAfterWrite); 378throw new ArgumentOutOfRangeException(nameof(value), SR.DateTimeOutOfRange); 396throw new InvalidOperationException(SR.LengthAfterWrite); 437throw new IOException(SR.DeleteOpenEntry); 442throw new NotSupportedException(SR.DeleteOnlyInUpdate); 482throw new ArgumentException(SR.PasswordRequired, nameof(password)); 520throw new ArgumentException(SR.PasswordRequired, nameof(password)); 537throw new ArgumentOutOfRangeException(nameof(access), SR.InvalidFileAccess); 545throw new InvalidOperationException(SR.CannotBeWrittenInReadMode); 551throw new InvalidOperationException(SR.CannotBeReadInCreateMode); 612throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 678throw new InvalidDataException(SR.EntryUncompressedSizeTooLargeForUpdateMode); 1071_ => throw new InvalidDataException(SR.InvalidAesStrength) 1083throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 1088throw new InvalidDataException(SR.PasswordRequired); 1095throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 1114throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 1193throw new IOException(SR.CreateModeWriteOnceAndOneEntryAtATime); 1217?? throw new InvalidOperationException(SR.EmptyPassword); 1233?? throw new InvalidOperationException(SR.EmptyPassword); 1267throw new IOException(SR.UpdateModeOneStream); 1272throw new NotSupportedException(SR.UnsupportedEncryptionMethod); 1279throw new ArgumentException(SR.PasswordRequired, nameof(password)); 1322throw new IOException(SR.UpdateModeOneStream); 1373throw new ArgumentException(SR.EmptyPassword, nameof(password)); 1391throw new ArgumentOutOfRangeException(nameof(encryptionMethod), encryptionMethod, SR.EncryptionNotSpecified); 1408_ => throw new InvalidDataException(SR.InvalidAesStrength) 1429message = SR.LocalFileHeaderCorrupt; 1440message = SR.LocalFileHeaderCorrupt; 1471message = SR.UnsupportedCompression; 1477message = SR.SplitSpanned; 1482message = SR.LocalFileHeaderCorrupt; 1499message = SR.LocalFileHeaderCorrupt; 1512message = SR.EntryTooLarge; 2193throw new InvalidOperationException(SR.DeletedEntry); 2252throw new NotSupportedException(SR.SeekingNotSupported); 2265throw new NotSupportedException(SR.SeekingNotSupported); 2277throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 2284throw new NotSupportedException(SR.ReadingNotSupported); 2290throw new NotSupportedException(SR.ReadingNotSupported); 2296throw new NotSupportedException(SR.ReadingNotSupported); 2302throw new NotSupportedException(SR.SeekingNotSupported); 2308throw 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)
312throw new InvalidDataException(SR.FieldTooBigUncompressedSize); 331throw new InvalidDataException(SR.FieldTooBigCompressedSize); 350throw new InvalidDataException(SR.FieldTooBigLocalHeaderOffset); 567throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 1175throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipCryptoStream.cs (6)
225throw new InvalidDataException(SR.TruncatedZipCryptoHeader); 239throw new InvalidDataException(SR.InvalidPassword); 293throw new NotSupportedException(SR.ReadingNotSupported); 316throw new NotSupportedException(SR.WritingNotSupported); 399throw new NotSupportedException(SR.ReadingNotSupported); 425throw new NotSupportedException(SR.WritingNotSupported);
System\IO\Compression\ZipCustomStreams.cs (20)
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); 647throw new InvalidDataException(SR.UnexpectedStreamLength); 660throw new InvalidDataException(SR.CrcMismatch); 679throw new NotSupportedException(SR.WritingNotSupported); 685throw new NotSupportedException(SR.WritingNotSupported); 691throw new NotSupportedException(SR.WritingNotSupported); 718throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting); 725throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 733throw new NotSupportedException(SR.SeekingNotSupported);
System\IO\Compression\Zstandard\ZstandardDecoder.cs (1)
376throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System\IO\Compression\Zstandard\ZstandardDictionary.cs (8)
45throw new ArgumentException(SR.ZstandardDictionary_EmptyBuffer, nameof(buffer)); 59throw new IOException(SR.ZstandardDictionary_CreateCompressionFailed); 68throw new IOException(SR.ZstandardDictionary_CreateDecompressionFailed); 93throw new ArgumentException(SR.ZstandardDictionary_EmptyBuffer, nameof(samples)); 99throw new ArgumentException(SR.Format(SR.ZstandardDictionary_Train_MinimumSampleCount, 5), nameof(sampleLengths)); 118throw new ArgumentException(SR.ZstandardDictionary_Train_InvalidSampleLength, nameof(sampleLengths)); 126throw new ArgumentException(SR.ZstandardDictionary_SampleLengthsMismatch, nameof(sampleLengths));
System\IO\Compression\Zstandard\ZstandardEncoder.cs (2)
410throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState); 438throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (6)
84throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 96throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 135throw new InvalidDataException(SR.ZstandardStream_Compress_InvalidData); 157throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 196throw new InvalidDataException(SR.ZstandardStream_Compress_InvalidData); 279throw new InvalidOperationException(SR.CannotWriteToDecompressionStream);
System\IO\Compression\Zstandard\ZstandardStream.cs (4)
38throw new ArgumentException(SR.Stream_FalseCanWrite, nameof(stream)); 45throw new ArgumentException(SR.Stream_FalseCanRead, nameof(stream)); 50throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 240throw new InvalidOperationException(SR.ZstandardStream_ConcurrentRWOperation);
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (5)
71throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidData); 140throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 314throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 447throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidStream); 451throw new InvalidDataException(SR.ZstandardStream_Decompress_TruncatedData);
System\IO\Compression\Zstandard\ZstandardUtils.cs (6)
70return new IOException(SR.ZstandardDecoder_WindowTooLarge); 73return new InvalidDataException(SR.ZstandardDecoder_DictionaryWrong); 79return new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState); 82return new IOException(SR.Format(SR.Zstd_InternalError, GetErrorMessage(error))); 96_ => throw new ArgumentOutOfRangeException(nameof(compressionLevel), compressionLevel, SR.ArgumentOutOfRange_Enum)