Class FastLZStream
ชื่อพื้นที่: Aspose.Zip.FastLZ การประกอบ: Aspose.Zip.dll (25.5.0)
กระแสวาล์วที่บีบอัดข้อมูลด้วย FastLZ. Implements รูปแบบตกแต่ง
public class FastLZStream : Stream, IDisposable, IAsyncDisposable
Inheritance
object ← MarshalByRefObject ← Stream ← FastLZStream
Implements
IDisposable , IAsyncDisposable
อนุญาโตตุลาการ
Stream.Null
,
Stream.CopyTo(Stream)
,
Stream.CopyTo(Stream, int)
,
Stream.CopyToAsync(Stream)
,
Stream.CopyToAsync(Stream, int)
,
Stream.CopyToAsync(Stream, CancellationToken)
,
Stream.CopyToAsync(Stream, int, CancellationToken)
,
Stream.Dispose()
,
Stream.Close()
,
Stream.Dispose(bool)
,
Stream.DisposeAsync()
,
Stream.Flush()
,
Stream.FlushAsync()
,
Stream.FlushAsync(CancellationToken)
,
Stream.CreateWaitHandle()
,
Stream.BeginRead(byte[], int, int, AsyncCallback?, object?)
,
Stream.EndRead(IAsyncResult)
,
Stream.ReadAsync(byte[], int, int)
,
Stream.ReadAsync(byte[], int, int, CancellationToken)
,
Stream.ReadAsync(Memory
Constructors
ความเร็วสูง(กระแส, int)
เริ่มต้นตัวอย่างใหม่ของคลาส Aspose.Zip.FastLZ.FastLZStream ที่เตรียมไว้สําหรับการบีบอัด
public FastLZStream(Stream stream, int compressionLevel)
Parameters
stream
Stream
กระแสเพื่อบันทึกข้อมูลที่บีบอัด
compressionLevel
int
ใช้ 1 สําหรับการบีบอัดที่เร็วขึ้นใช้ 2 สําหรับอัตราส่วนคอมเพรสชั่นที่ดีขึ้น
Exceptions
stream’ is null.
stream’ does not support writing.
compressionLevel’ is more than 2 or less than 1.
Properties
CanRead
ได้รับค่าแสดงให้เห็นว่าการไหลปัจจุบันจะสนับสนุนการอ่านหรือไม่
public override bool CanRead { get; }
คุณสมบัติมูลค่า
CanSeek
ได้รับค่าแสดงให้เห็นว่าการไหลปัจจุบันจะสนับสนุนการค้นหาหรือไม่
public override bool CanSeek { get; }
คุณสมบัติมูลค่า
CanWrite
ได้รับค่าแสดงให้เห็นว่าการไหลปัจจุบันสนับสนุนการเขียนหรือไม่
public override bool CanWrite { get; }
คุณสมบัติมูลค่า
Length
รับความยาวในไบต์ของไหล
public override long Length { get; }
คุณสมบัติมูลค่า
Position
รับหรือตั้งตําแหน่งภายในกระแสปัจจุบัน
public override long Position { get; set; }
คุณสมบัติมูลค่า
Methods
Close()
ปิดการไหลปัจจุบันและปล่อยทรัพยากรใด ๆ (เช่นซ็อกเก็ตและจัดการไฟล์) ที่เกี่ยวข้องกับการไหลปัจจุบัน
public override void Close()
Flush()
ทําความสะอาด buffers ทั้งหมดสําหรับกระแสนี้และทําให้ข้อมูล buffers ใด ๆ จะถูกเขียนไปยังอุปกรณ์พื้นฐาน
public override void Flush()
Read(บิต[ ], int , int)
อ่านชุดไบต์จากกระแสและส่งเสริมตําแหน่งภายในกระแสโดยจํานวนไบต์อ่าน ไม่สนับสนุน
public override int Read(byte[] buffer, int offset, int count)
Parameters
buffer
byte
[ ]
ชุดไบต์ เมื่อวิธีการนี้กลับมาไบต์มีชุดไบต์ที่ระบุด้วยค่าระหว่าง offset และ (offset + count - 1) ที่ถูกแทนที่โดยไบต์อ่านจากแหล่งปัจจุบัน
offset
int
byte ฐานที่ไม่มีค่าใช้จ่ายใน buffer ที่ที่จะเริ่มต้นการจัดเก็บข้อมูลอ่านจากไหลปัจจุบัน
count
int
จํานวนไบต์สูงสุดที่จะอ่านจากกระแสปัจจุบัน
Returns
หมายเลขไบต์ทั้งหมดที่อ่านลงในไบเฟอร์ นี่อาจน้อยกว่าจํานวนไบต์ที่ต้องการหากไบต์จํานวนมากในขณะนี้ไม่สามารถใช้ได้หรือศูนย์ (0) หากสิ้นสุดของกระแสได้มาถึง
Seek(ระยะยาว SeekOrigin)
ตั้งตําแหน่งภายในกระแสปัจจุบัน
public override long Seek(long offset, SeekOrigin origin)
Parameters
offset
long
คะแนนไบต์เมื่อเทียบกับพารามิเตอร์ต้นกําเนิด
origin
SeekOrigin
หมายเลขประเภท SeekOrigin ซึ่งหมายถึงจุดหมายที่ใช้ในการรับตําแหน่งใหม่
Returns
ตําแหน่งใหม่ภายในกระแสปัจจุบัน
SetLength(ระยะยาว)
กําหนดความยาวของกระแสปัจจุบัน
public override void SetLength(long value)
Parameters
value
long
ความยาวที่ต้องการของกระแสปัจจุบันในไบต์
Write(บิต[ ], int , int)
เขียน sequence of bytes to the compressing stream and advances the current position within this stream by the number of bytes written. เขียน sequence of bytes to the compressing stream and advances the current position within this stream by the number of bytes written.
public override void Write(byte[] buffer, int offset, int count)
Parameters
buffer
byte
[ ]
ชุดไบต์ วิธีการนี้คัดลอกการคํานวณไบต์จาก buffer ไปยังการไหลปัจจุบัน
offset
int
byte ฐานที่ไม่มีค่าใช้จ่ายใน buffer ที่จะเริ่มคัดลอก byte ไปยังการไหลปัจจุบัน
count
int
หมายเลขไบต์ที่จะเขียนไว้ในปัจจุบัน