How to use EncdDecd.EncodeStream
Вопрос
I want to encode a stream but something doesn't work. After encoding the output stream is empty:
procedure TForm5.Button1Click(Sender: TObject);
VAR s: String;
InpStream, OutStream: TMemoryStream;
begin
InpStream:= TMemoryStream.Create;
OutStream:= TMemoryStream.Create;
s:= 'zzzzzzzzzzzzzzzz'+CRLF+'zzzzzzzzzzzzzzzz';
InpStream.WriteBuffer(s[1], Length(s)); <---- after this, Size of Inpstream is 34
EncdDecd.EncodeStream(InpStream, OutStream);
if OutStream.Size<= 0
then EmptyDummy; <------- OutStream.Size is zero!
FreeAndNil(InpStream);
FreeAndNil(OutStream);
end;
Нет правильного решения
Не связан с StackOverflow