#1 Re: Synopse Company » MPL/GPL/LGPL tri-license » 2012-06-15 11:10:00

ok, thats clear on how to use it, appreciated.
i will do like the way you mention
thank you

#2 Re: Synopse Company » MPL/GPL/LGPL tri-license » 2012-06-15 05:22:23

Hello,
I am using

1.SynTaskDialog.pas
2.SynZip.pas
3.SynZipFiles.pas
4.Synopse.inc
5.deflate.obj
6.trees.obj

for my application from from -http://synopse.info/fossil/dir?ci=tip

mine is a component as well as a application that use 1.SynTaskDialog.pas
for showing messages

we plan to give the
1.Bpl
2.DCU
3.dpk file

4 and the application

so for the component
what exactly i have to mention?

" Units used from http://synopse.info
1.SynTaskDialog.pas
2.SynZip.pas
3.SynZipFiles.pas
4.Synopse.inc
5.deflate.obj
6.trees.obj
"

and about the Licence? MPL ?
as i want to make all the open source i have used as open but keep mine as closed.

i have only modified 1.SynTaskDialog.pas
so i will make it open with component

#3 Re: Low level and performance » LZO and SynLZ compression units » 2012-06-15 05:11:57

"Do you use the latest version from http://synopse.info/fossil ?"
i downloaded from -http://synopse.info/fossil/dir?ci=tip
1.SynTaskDialog.pas
2.SynZip.pas
3.SynZipFiles.pas
4.Synopse.inc
5.deflate.obj
6.trees.obj


ok, as i was writing the reply i got my answer(mistake)

i in my code had missed 'Free'

so i was only adding the files but i was not TZipWrite..im sory
i just figured out that in my code i had made changes

Thank you

#4 Re: Low level and performance » How to unzip or zip files content » 2012-06-15 05:00:14

Ok, got it smile

i tried

procedure SynZipZipper(sZipFileName,sJpegFileName : string);
var
  Data     : string;
  sUmlDPath : string;
begin
 if FileExists(sZipFileName)  then DeleteFile(pchar(sZipFileName));
 with TZipWrite.Create(sZipFileName) do
  try
    AddDeflated(sJpegFileName);
    AddDeflated(FullUmldFilePath);  
  free;
except
    on E : Exception do
    begin
     free;
    end;
  end;

end;

#5 Re: Low level and performance » LZO and SynLZ compression units » 2012-06-14 07:03:41

hey

with TZipWrite.Create('myzipfile.zip') do
try
  AddDeflated('file1.bmp',true,6);
  AddDeflated('file2.bmp',true,6);
finally
  Free;
end;

on decompression with winrar gives
`!   G:\UFastMM4\Test applications\sync compression\synopseCompresssion.zip: The archive is either in unknown format or damaged`
error sad ..can you tell me how to get rid of it?

#6 Re: Low level and performance » How to unzip or zip files content » 2012-06-14 06:11:49

what is `data` in the following code?

procedure TestCompression;
var FN: TFileName;
begin
  FN := ChangeFileExt(paramstr(0),'.zip');
  with TZipWrite.Create(FN) do
  try
    AddDeflated('one.exe',pointer(Data),length(Data));  //here what is data?
    assert(Count=1);
    AddDeflated('ident.txt',M.Memory,M.Position);         //here what is M?
    assert(Count=2);
  finally
    Free;
  end;
end;


im trying this code for compressing a jpg file

procedure TestCompression;
var FN: TFileName;
Data : string;
begin
  FN := ChangeFileExt(paramstr(0),'.zip');
  with TZipWrite.Create(FN) do
  try
    AddDeflated('C:\Documents and Settings\All Users\Documents\leakTracker\14_06_12 11_33_50 AM.jpg',pointer(Data),length(Data));
    assert(Count=1);
except
    on E : Exception do
      free ;
  end;
end;

it does not work, it shows the zip size a s 1 KB

can you tell me what is wrong?

Board footer

Powered by FluxBB