C# 클래스 NSoft.NFramework.FusionCharts.PDFCompress

This is an ad-hoc class to compress PDF stream. Currently this class compresses binary (byte) stream using RLE which PDF 1.3 specification has thus formulated: The RunLengthDecode filter decodes data that has been encoded in a simple byte-oriented format based on run length. The encoded data is a sequence of runs, where each run consists of a length byte followed by 1 to 128 bytes of data. If the length byte is in the range 0 to 127, the following length + 1 (1 to 128) bytes are copied literally during decompression. If length is in the range 129 to 255, the following single byte is to be copied 257 − length (2 to 128) times during decompression. A length value of 128 denotes EOD. The chart image compression ratio comes to around 10:3
파일 보기 프로젝트 열기: debop/NFramework

공개 메소드들

메소드 설명
PDFCompress ( byte UnCompressed ) : System.IO

Takes the uncompressed byte array

RLECompress ( ) : byte[]

compresses uncompressed data to compressed data in byte array

비공개 메소드들

메소드 설명
WriteNoRepeater ( MemoryStream NoRepeatBytes ) : void
WriteRunLength ( int length, byte encodee ) : int

Write compressed data as RunLength

메소드 상세

PDFCompress() 공개 메소드

Takes the uncompressed byte array
public PDFCompress ( byte UnCompressed ) : System.IO
UnCompressed byte uncompressed data
리턴 System.IO

RLECompress() 공개 메소드

compresses uncompressed data to compressed data in byte array
public RLECompress ( ) : byte[]
리턴 byte[]