亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? blobdemo.pas

?? 一個delphi下使用的壓縮組件 TCompress Component Set V8
?? PAS
字號:
(* BLOBDEMO.PAS for TCompress V3.0 (only comments changed from V2.5)

   This unit provides example code for two things:
   1. On-the-fly creation of compressed blob fields
   2. Writing and reading of any kind of data (e.g. arrays, AVI, WAV etc)
      to/from a compressed blob field.

   Before running the program, you need to use the Database Desktop to create
   a table called BLOB.DB in the DBDEMOS alias which contains a 'Name' field (A10)
   and a 'Data' field (B0). For a full test, you'd also want to add routines
   to put meaningful data into the OurData array, and display it
   before/after blob reads.  We're just compressing a bunch of zeros...

*)
unit Blobdemo;

interface

uses
{$IFDEF CLR}
  System.ComponentModel,
{$ENDIF}
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, Grids, DBGrids, ExtCtrls, DBCtrls, DB, DBTables,
  Compress, CompCtrl;       { <--- CompCtrl for the TCBlobField/TCBlobstream types }


type
  TForm1 = class(TForm)
    Table1: TTable;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    SaveArray: TButton;
    LoadArray: TButton;
    Compress1: TCompress;
    Table1Name: TStringField;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure SaveArrayClick(Sender: TObject);
    procedure LoadArrayClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  TestCount: Smallint; { just for making field names }

implementation

{$R *.DFM}

var  BlobDataField:TCBlobField;  { compressed field we'll set up at runtime }
     OurData: Array[1..8000] of byte; { Data to go to/from the field }

const SizeOfOurData = 8000;

{ Here, we create our compressed field BEFORE opening the table. Note that
  the field ('Data' in this case) should *not* appear in the list of fields
  you see when you double-click on the Grid or on Table1. If it is, remove it.
  If the list is blank, add whatever you need, but NOT 'Data'.            }

procedure TForm1.FormCreate(Sender: TObject);
begin
  BlobDataField := TCBlobField.Create(Self);
  BlobDataField.CompressSource := Compress1; { Our TCompress component     }
  BlobDataField.CompressionMethod := coRLE; { RLE compression, for example }
  BlobDataField.FieldName:='Data'; { or whatever you call it in the table }
  BlobDataField.Size := 0;         { The # of bytes stored WITHIN the table }
  BlobDataField.DataSet := Table1;
  try
    Table1.Open;  { Note: In Delphi 2.0+, we've edited our grid (double-click) to ensure
                  that the new field will NOT be added to the grid. This is
                  because the V2.0 grids try to detail with (and display) it as
                  a TBlobfield instead of a TCBlobfield, which causes spurious
                   "Blob not open" errors. Please adopt the same tactic if you
                   are working with custom blob fields like this in Delphi 2.
                 }
  except

(* This code here would be FINE except that for a Delphi VCL/BDE bug,
   -- telling it to create a table with a ftBlob field size zero
   (something perfectly possible in Database Desktop) results
   in a table with a ftBlob ('B') field size 1. This is a baaad
   thing and doesn't work for our purposes. So alas, we have to ask you
   to create the demo table manually. Sorry about that. It's a pain.

UPDATE April 97: This commented-out code should now work for Delphi 1, but
only by exploiting another bug which arises from setting TableType to ttDefault
instead of ttParadox. However, the GOOD news is that there is a VCL patch
available to remove the original bug -- for all Delphi versions. If you want
to know how to create a table with a 0-length Blob field in it, see
http://www.spis.co.nz/blobfix.htm

    with Table1 do
    begin
      DatabaseName := 'DBDEMOS';
      TableName := 'BLOB.DB';
      TableType := ttDefault; { if ttParadox, Delphi 1 will misbehave again }
      with FieldDefs do
      begin
        Clear;
        Add('Name', ftString, 10,True);
        Add('Data', ftBlob, 0,False);  { bzzzt -- wrong -- makes size 1, dammit! }
      end;
      IndexDefs.Clear;
      CreateTable;
      FieldDefs.Clear;
      temptable.free;
      Table1.Open; { open should work this time... but won't, due to above "spec" }
    end;
*)      { so instead, we: }
     showMessage('Please create a table called BLOB.DB in the'+#13+
                 'DBDEMOS alias, according to the specs in BLOBDEMO.PAS.'+#13+#13+
                 'THEN run this program again.');

  end;
end;



{ After all that, here's the enjoyable bits.... }

{ How to write/compress our array data to the blob }
procedure TForm1.SaveArrayClick(Sender: TObject);
var cbs: TCBlobstream;
begin
     { this is cosmetic stuff }
  Inc(TestCount);
  Table1.append; { put a new record in, what the heck (or you could just Edit) }
  Table1.FieldByName('Name').asstring := 'Test '+IntToStr(TestCount);

    { this is the IMPORTANT bit }
  cbs:= TCBlobstream.create(BlobDataField,bmWrite); { will save our data to it }
  cbs.writeBuffer(OurData,SizeOfOurData);         { standard stream method   }
  showmessage('Compressed and wrote '+IntToStr(cbs.size)+' bytes');
  cbs.free;    { done! (compression occurs just here...) }
  Table1.Post;
end;
{ Note: If the data was coming from a file or another object, you could use the
        CopyFrom method from the applicable filestream/memorystream/blobstream }


{ How to read/expand our data (of whatever nature) back into our array }
procedure TForm1.LoadArrayClick(Sender: TObject);
var cbs: TCBlobstream;
    bs: TBlobStream;
begin
  cbs:= TCBlobstream.create(BlobDataField,bmRead); { will read our data from it }
  cbs.readBuffer(OurData,sizeof(OurData));         { standard stream method   }
  showmessage('Expanded and read '+IntToStr(cbs.size)+' bytes');
  cbs.free;

  { Oh, and by the way... }
  bs := TBlobStream.Create(BlobDataField,bmread); { a handle on our RAW (compressed) data }
  showmessage('By the way, that was stored in only '+IntToStr(bs.size)+' bytes');
  bs.free;
end;

{ Cleanup code }
procedure TForm1.FormDestroy(Sender: TObject);
begin
  if Table1.Active then Table1.close;
  BlobDataField.free;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲日韩一区二区三区| 成人性生交大片免费看中文网站| 国产一二精品视频| 一本久道中文字幕精品亚洲嫩| 欧美一区2区视频在线观看| 欧美国产一区在线| 午夜精品久久久久久久蜜桃app| 国产精品99久久久久久似苏梦涵 | 中文字幕不卡在线播放| 日日嗨av一区二区三区四区| av在线一区二区三区| 欧美不卡在线视频| 午夜精品视频在线观看| 日本乱人伦aⅴ精品| 国产三级精品三级| 久久疯狂做爰流白浆xx| 欧美一级日韩一级| 日本欧美加勒比视频| 欧美综合色免费| 亚洲美女区一区| 99久久免费精品高清特色大片| 国产午夜精品在线观看| 男人操女人的视频在线观看欧美| 欧美色综合影院| 亚洲美女区一区| 色噜噜狠狠色综合欧洲selulu| 国产精品免费视频网站| 成人深夜视频在线观看| 国产亚洲一本大道中文在线| 美女爽到高潮91| 精品国产凹凸成av人导航| 久久精品国产精品亚洲精品 | 久久91精品国产91久久小草| 91.com视频| 麻豆精品视频在线| 久久亚洲二区三区| 国产成+人+日韩+欧美+亚洲 | 欧美一区二区精品在线| 美女视频第一区二区三区免费观看网站 | 久久99深爱久久99精品| 精品福利一区二区三区| 国产精品一区免费在线观看| 精品国产伦一区二区三区免费| 免费成人性网站| 久久久久久久久蜜桃| 丁香一区二区三区| 亚洲欧美国产三级| 欧美日韩一区国产| 久久精品国产亚洲a| 国产午夜一区二区三区| 99精品偷自拍| 天堂蜜桃一区二区三区| 2021中文字幕一区亚洲| av不卡一区二区三区| 一区二区三区小说| 日韩欧美色综合网站| 岛国精品在线观看| 一区二区三区四区蜜桃| 日韩一区二区在线播放| 国产精品1024| 亚洲你懂的在线视频| 欧美一区二区三区免费| 成人精品亚洲人成在线| 五月婷婷综合在线| 国产女同性恋一区二区| 欧美日韩高清一区二区不卡| 国产一区二区三区黄视频| 亚洲人123区| 日韩欧美一级特黄在线播放| 99视频精品全部免费在线| 性做久久久久久免费观看欧美| 久久综合色之久久综合| 91国产丝袜在线播放| 国产又黄又大久久| 亚洲一区电影777| 久久久综合激的五月天| 在线播放国产精品二区一二区四区| 精品亚洲成av人在线观看| 一区二区三区在线免费视频| 26uuu国产电影一区二区| 日本韩国一区二区三区视频| 国产一区 二区| 性做久久久久久| 亚洲色图清纯唯美| 亚洲精品在线观看网站| 欧美伦理电影网| 99久久免费视频.com| 国产一区999| 青草国产精品久久久久久| 一区二区三区国产| 国产亚洲1区2区3区| 日韩视频在线观看一区二区| 色拍拍在线精品视频8848| 成人一级片网址| 国内精品写真在线观看| 日本视频一区二区三区| 亚洲与欧洲av电影| 中文字幕永久在线不卡| 亚洲国产精品成人综合| 久久亚洲捆绑美女| 欧美一级在线免费| 欧美日韩成人在线一区| 欧美日韩成人一区| 欧美体内she精高潮| 在线观看三级视频欧美| 欧洲中文字幕精品| 91婷婷韩国欧美一区二区| 成人av先锋影音| 国产成人自拍网| 国产精品1区2区| 国产不卡免费视频| 国v精品久久久网| 粉嫩一区二区三区在线看| 国产成人在线观看免费网站| 久久99精品国产91久久来源| 麻豆国产欧美日韩综合精品二区 | 波多野结衣亚洲| 成a人片国产精品| 波多野结衣在线aⅴ中文字幕不卡| 国产成人av一区二区三区在线 | 免费在线视频一区| 男男视频亚洲欧美| 国产一区二区三区精品视频| 国产精品乡下勾搭老头1| 国产99久久久久久免费看农村| 国产乱码精品1区2区3区| 国产乱人伦精品一区二区在线观看| 韩国欧美一区二区| 国产精品91xxx| 成人高清av在线| 色综合亚洲欧洲| 久久先锋影音av鲁色资源| 久久综合视频网| 中文字幕欧美日韩一区| 伊人开心综合网| 日韩综合在线视频| 国产综合久久久久影院| 99免费精品视频| 欧美图区在线视频| 欧美精品一区二区三区蜜臀| 国产精品每日更新| 夜夜操天天操亚洲| 久久国产综合精品| 成人午夜私人影院| 欧美日韩在线直播| 久久久久亚洲蜜桃| 亚洲国产精品一区二区久久恐怖片 | 91伊人久久大香线蕉| 日本韩国一区二区三区视频| 91精品国产综合久久国产大片| 精品乱码亚洲一区二区不卡| 中文字幕精品在线不卡| 天天综合色天天综合色h| 精品一区二区三区影院在线午夜 | 亚洲人成亚洲人成在线观看图片| 亚洲综合在线第一页| 蜜桃av一区二区三区电影| 99久久精品国产网站| 欧美一级午夜免费电影| 国产精品二三区| 精久久久久久久久久久| 欧美自拍丝袜亚洲| 久久久精品综合| 天堂va蜜桃一区二区三区| 成人国产一区二区三区精品| 在线电影欧美成精品| 亚洲摸摸操操av| 国产酒店精品激情| 91精品久久久久久久99蜜桃| 亚洲欧美一区二区不卡| 国产精品原创巨作av| 91精品婷婷国产综合久久性色 | 青青草视频一区| 日本道在线观看一区二区| 国产免费观看久久| 精品综合久久久久久8888| 欧美日韩色一区| 一区二区三区在线看| 成人福利电影精品一区二区在线观看| 91精品欧美福利在线观看| 亚洲大片在线观看| 色婷婷久久久久swag精品| 亚洲国产精品成人综合 | 在线观看视频一区二区欧美日韩| 国产拍欧美日韩视频二区| 九九九久久久精品| 日韩欧美三级在线| 久久精品国产在热久久| 制服丝袜国产精品| 亚洲成人激情社区| 在线免费观看日本欧美| 一区二区三区四区高清精品免费观看| 成人免费观看av| 久久精品一区二区三区四区| 激情五月播播久久久精品| 日韩免费看的电影| 国产主播一区二区三区| 精品久久人人做人人爽| 国产一区二区三区视频在线播放| 精品国产污网站|