Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ internal GnuSparseStream(Stream rawStream, long realSize)
_realSize = realSize;
}

// Parses the sparse map on first read. Populates _segments, _packedStartOffsets,
// and _dataStart. Throws InvalidDataException if the sparse map is malformed.
// Parses the sparse map on first read. Populates _segments and _packedStartOffsets.
// Throws InvalidDataException if the sparse map is malformed.
private async ValueTask EnsureInitializedCoreAsync<TAdapter>(CancellationToken cancellationToken)
where TAdapter : IReadWriteAdapter
{
Expand Down Expand Up @@ -152,8 +152,7 @@ public override long Seek(long offset, SeekOrigin origin)
}

_virtualPosition = newPosition;
// _currentSegmentIndex is not reset here; FindSegmentFromCurrent handles
// backward seeks using binary search.
// _currentSegmentIndex is not reset here; see the Position setter for why.
return _virtualPosition;
}

Expand Down Expand Up @@ -330,7 +329,7 @@ private async ValueTask CopyPopulatedDataToCoreAsync<TAdapter>(FileStream destin
}

// Reads from the packed data at the given packedOffset.
// After EnsureInitialized, the raw stream is positioned at _dataStart and
// After EnsureInitialized, the raw stream is positioned at the start of the packed data and
// _nextPackedOffset tracks how far into the packed data we've read.
// Returns the number of bytes actually read (may be less than destination.Length).
private async ValueTask<int> ReadFromPackedDataCoreAsync<TAdapter>(Memory<byte> destination, long packedOffset, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private static int WritePosixMagicAndVersion(Span<byte> buffer)
return checksum;
}

// Writes the magic and vresion fields of a gnu entry into the specified spans.
// Writes the magic and version fields of a gnu entry into the specified spans.
private static int WriteGnuMagicAndVersion(Span<byte> buffer)
{
int checksum = WriteLeftAlignedBytesAndGetChecksum(GnuMagicBytes, buffer.Slice(FieldLocations.Magic, FieldLengths.Magic));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace System.IO.Compression
/// Process - Process input. Encoder may postpone producing output, until it has processed enough input.
/// Flush - Produce output for all processed input. Actual flush is performed when input stream is depleted and there is enough space in output stream.
/// Finish - Finalize the stream. Adding more input data to finalized stream is impossible.
/// EmitMetadata - Emit metadata block to stream. Stream is soft-flushed before metadata block is emitted. Metadata bloc MUST be no longer than 16MiB.
/// EmitMetadata - Emit metadata block to stream. Stream is soft-flushed before metadata block is emitted. Metadata block MUST be no longer than 16MiB.
/// </summary>
internal enum BrotliEncoderOperation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public static async Task<ZipEndOfCentralDirectoryBlock> ReadBlockAsync(Stream st

if (!TryReadBlockInitialize(stream, blockContents, bytesRead, out ZipEndOfCentralDirectoryBlock? eocdBlock, out bool readComment))
{
// // We shouldn't get here becasue we found the eocd block using the signature finder
// We shouldn't get here because we found the EOCD block using the signature finder
throw new InvalidDataException(SR.EOCDNotFound);
}
else if (readComment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ public static unsafe ZipEndOfCentralDirectoryBlock ReadBlock(Stream stream)

if (!TryReadBlockInitialize(stream, blockContents, bytesRead, out ZipEndOfCentralDirectoryBlock? eocdBlock, out bool readComment))
{
// // We shouldn't get here becasue we found the eocd block using the signature finder
// We shouldn't get here because we found the EOCD block using the signature finder
throw new InvalidDataException(SR.EOCDNotFound);
}
else if (readComment)
Expand Down
Loading