188 references to SR
System.IO.Compression (188)
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); 354throw new ZLibException(SR.ZLibErrorDLLLoadError, e);
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)
212throw new InvalidDataException(SR.UnknownBlockType); 238throw new InvalidDataException(SR.UnknownBlockType); 297throw new InvalidDataException(SR.InvalidBlockLength); 330throw new InvalidDataException(SR.UnknownState); 393throw new InvalidDataException(SR.GenericInvalidData); 415throw new InvalidDataException(SR.GenericInvalidData); 473throw new InvalidDataException(SR.UnknownState); 665throw 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)
80throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream)); 93throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 115throw new ArgumentException(SR.NotSupported_UnwritableStream, nameof(stream)); 195get { throw new NotSupportedException(SR.NotSupported); } 200get { throw new NotSupportedException(SR.NotSupported); } 201set { throw new NotSupportedException(SR.NotSupported); } 258throw new NotSupportedException(SR.NotSupported); 263throw new NotSupportedException(SR.NotSupported); 387throw new InvalidOperationException(SR.CannotReadFromDeflateStream); 396throw new InvalidOperationException(SR.CannotWriteToDeflateStream); 402throw new InvalidDataException(SR.GenericInvalidData); 405throw new InvalidDataException(SR.TruncatedData); 1032return Task.FromException(new InvalidDataException(SR.GenericInvalidData)); 1081throw new InvalidDataException(SR.GenericInvalidData); 1138throw 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)
55get { throw new NotSupportedException(SR.NotSupported); } 60get { throw new NotSupportedException(SR.NotSupported); } 61set { throw new NotSupportedException(SR.NotSupported); } 72throw new NotSupportedException(SR.NotSupported); 77throw 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\ZipArchive.Async.cs (6)
251throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 279throw new InvalidDataException(SR.EOCDNotFound); 292throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 297throw new InvalidDataException(SR.CDCorrupt, ex); 301throw new InvalidDataException(SR.CDCorrupt, ex); 323throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected);
System\IO\Compression\ZipArchive.cs (23)
233throw new NotSupportedException(SR.EntriesInCreateMode); 351throw new NotSupportedException(SR.EntriesInCreateMode); 387throw new ArgumentException(SR.EntryNameAndCommentEncodingNotSupported, nameof(EntryNameAndCommentEncoding)); 436throw new NotSupportedException(SR.CreateInReadMode); 461throw new IOException(SR.CreateModeCreateEntryWhileOpen); 561throw new InvalidDataException(SR.NumEntriesWrong); 585throw new InvalidDataException(SR.NumEntriesWrong); 632throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 643throw new InvalidDataException(SR.SplitSpanned); 649throw new InvalidDataException(SR.SplitSpanned); 673throw new InvalidDataException(SR.EOCDNotFound); 686throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 691throw new InvalidDataException(SR.CDCorrupt, ex); 695throw new InvalidDataException(SR.CDCorrupt, ex); 702throw new InvalidDataException(SR.FieldTooBigOffsetToZip64EOCD); 707throw new InvalidDataException(SR.InvalidOffsetToZip64EOCD); 717throw new InvalidDataException(SR.FieldTooBigNumEntries); 720throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 723throw new InvalidDataException(SR.SplitSpanned); 745throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 952throw new ArgumentException(SR.CreateModeCapabilities); 956throw new ArgumentException(SR.ReadModeCapabilities); 964throw new ArgumentException(SR.UpdateModeCapabilities);
System\IO\Compression\ZipArchiveEntry.Async.cs (6)
65throw new ArgumentOutOfRangeException(nameof(access), SR.InvalidFileAccess); 72throw new InvalidOperationException(SR.CannotBeWrittenInReadMode); 77throw new InvalidOperationException(SR.CannotBeReadInCreateMode); 105throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 260throw new IOException(SR.UpdateModeOneStream); 304message = SR.LocalFileHeaderCorrupt;
System\IO\Compression\ZipArchiveEntry.cs (29)
152throw new ArgumentException(SR.EntryNamesTooLong); 201throw new InvalidOperationException(SR.LengthAfterWrite); 297throw new NotSupportedException(SR.ReadOnlyArchive); 299throw new IOException(SR.FrozenAfterWrite); 301throw new ArgumentOutOfRangeException(nameof(value), SR.DateTimeOutOfRange); 317throw new InvalidOperationException(SR.LengthAfterWrite); 345throw new IOException(SR.DeleteOpenEntry); 348throw new NotSupportedException(SR.DeleteOnlyInUpdate); 404throw new ArgumentOutOfRangeException(nameof(access), SR.InvalidFileAccess); 411throw new InvalidOperationException(SR.CannotBeWrittenInReadMode); 416throw new InvalidOperationException(SR.CannotBeReadInCreateMode); 471throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 850throw new IOException(SR.CreateModeWriteOnceAndOneEntryAtATime); 877throw new IOException(SR.UpdateModeOneStream); 933message = SR.LocalFileHeaderCorrupt; 959message = SR.UnsupportedCompression; 965message = SR.SplitSpanned; 970message = SR.LocalFileHeaderCorrupt; 983message = SR.LocalFileHeaderCorrupt; 996message = SR.EntryTooLarge; 1455throw new InvalidOperationException(SR.DeletedEntry); 1509throw new NotSupportedException(SR.SeekingNotSupported); 1522throw new NotSupportedException(SR.SeekingNotSupported); 1533throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 1539throw new NotSupportedException(SR.ReadingNotSupported); 1545throw new NotSupportedException(SR.ReadingNotSupported); 1551throw new NotSupportedException(SR.ReadingNotSupported); 1557throw new NotSupportedException(SR.SeekingNotSupported); 1563throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting);
System\IO\Compression\ZipBlocks.Async.cs (2)
92throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 250throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipBlocks.cs (5)
313throw new InvalidDataException(SR.FieldTooBigUncompressedSize); 317throw new InvalidDataException(SR.FieldTooBigCompressedSize); 321throw new InvalidDataException(SR.FieldTooBigLocalHeaderOffset); 522throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 967throw new InvalidDataException(SR.EOCDNotFound);
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); 297throw new NotSupportedException(SR.SeekingNotSupported); 317throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 323throw new NotSupportedException(SR.ReadingNotSupported); 414throw new NotSupportedException(SR.SeekingNotSupported); 427throw new IOException(SR.IO_SeekBeforeBegin); 439throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting); 445throw new NotSupportedException(SR.WritingNotSupported); 451throw new NotSupportedException(SR.WritingNotSupported); 518throw new NotSupportedException(SR.SeekingNotSupported); 532throw new NotSupportedException(SR.SeekingNotSupported); 545throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 551throw new NotSupportedException(SR.ReadingNotSupported); 557throw new NotSupportedException(SR.ReadingNotSupported); 563throw new NotSupportedException(SR.ReadingNotSupported); 569throw new NotSupportedException(SR.SeekingNotSupported); 575throw new NotSupportedException(SR.SetLengthRequiresSeekingAndWriting);
System\IO\Compression\Zstandard\ZstandardDecoder.cs (1)
336throw 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)); 117throw new ArgumentException(SR.ZstandardDictionary_Train_InvalidSampleLength, nameof(sampleLengths)); 125throw 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)
45throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidData); 108throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 183throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 291throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidStream); 295throw 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)