Base64字符串转流
procedure Base64StringToStream(AStream: TStream; const s: string);
var
B: TBytes;
vStream: TMemoryStream;
begin
vStream := TMemoryStream.Create;
try
B := TNetEncoding.Base64.DecodeStringToBytes(s);
vStream.WriteBuffer(B, Length(B));
vStream.position := 0;
AStream.Size := 0;
ZDecompressStream(vStream, AStream);
AStream.Position := 0;
finally
vStream.DisposeOf;
end;
end;
无
《学习大师原创文档,请勿转载,侵权必究》