You are not logged in.
Pages: 1
Bonjour AB and good 2015 !!
I'm troubling wirh pdf stream and synzip uncompress.
After many attempts i've done this test with compress and uncompress : the uncompress function returns Error -3 during zip/deflate process.
Perhaps i'm doing something wrong, but cannot understand where it is.
program testsynzip;
{$I Synopse.inc}
uses
{$I SynDprUses.inc}
Forms,
main in 'main.pas' {Form1};
{$R *.res}
{$R Vista.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
unit main;
interface
uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils,
System.Variants,
System.Classes,
Vcl.Graphics,
Vcl.Controls,
Vcl.Forms,
Vcl.Dialogs,
syncommons,
synzip, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var si, s1, s2 : tHeapmemorystream;
li, lo : integer;
begin
si := tHeapMemoryStream.Create;
s1 := tHeapMemoryStream.Create;
s2 := tHeapMemoryStream.Create;
si.LoadFromFile('main.pas');
lo := compressstream(si.Memory, si.Size, s1, 7, true);
s1.SaveToFile('main.zpd');
li := uncompressstream(s1.Memory, s1.Size, s2, nil);
s2.SaveToFile('main.cpy');
s2.Free;
s1.Free;
si.Free;
end;
end.
Offline
P.S.
I'm using dephy XE4; synopse updated with NightlyBuild.
Offline
Many tx AB,
so i can't use uncompress to deflate a pdf stream : is there a synzyp function that may I use ?
Offline
You should be able to use both layouts now.
Offline
tx a lot AB !!!
Offline
Pages: 1