Saving Extra Data (binary) in rvf document?
Saving Extra Data (binary) in rvf document?
Is there any way to store binary data, for example audio files or whatever, inside a rvf document?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It's possible to save additional text data using DocProperties property.
And any binary data can be converted to a text form.
The simplest way - to represent each byte of data as 2 hexadecimal characters. Functions for encoding/decoding can be found in RVFuncs unit:
binary -> text
function RVFStream2TextString(Stream: TMemoryStream): String;
text -> binary
function RVFTextString2Stream(const str: String; Stream: TMemoryStream): Boolean;
More sophisticated way - using Base64 encoding. The resulting string will be not so large as if you use the first method. Functions for encoding/decoding can be found here: http://www.zeitungsjunge.de/delphi/mime/index.htm
And any binary data can be converted to a text form.
The simplest way - to represent each byte of data as 2 hexadecimal characters. Functions for encoding/decoding can be found in RVFuncs unit:
binary -> text
function RVFStream2TextString(Stream: TMemoryStream): String;
text -> binary
function RVFTextString2Stream(const str: String; Stream: TMemoryStream): Boolean;
More sophisticated way - using Base64 encoding. The resulting string will be not so large as if you use the first method. Functions for encoding/decoding can be found here: http://www.zeitungsjunge.de/delphi/mime/index.htm