Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > Miscellaneous > Archive > Sunrise

Notices

 
 
Thread Tools Search this Thread
Old 02-14-2006, 04:04 AM   #1
trfzwsc
Junior Member
trfzwsc began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Feb 2006
New: Owner ID supported?

Hi,

In Plucker Desktop, I can input the owner id of my PDA
so the generated PDBs can only be opened by myself.
I can't find this feature in Sunrise 0.42j.
Will this feature be supported? When?

Thankyou,
FZ
trfzwsc is offline  
Old 02-14-2006, 04:23 AM   #2
Laurens
Jah Blessed
Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.
 
Laurens's Avatar
 
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
No, this feature will not be supported.
Laurens is offline  
Advert
Old 02-14-2006, 09:01 PM   #3
trfzwsc
Junior Member
trfzwsc began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Feb 2006
Can I help?

Can I help to add this feature?
trfzwsc is offline  
Old 02-15-2006, 02:24 AM   #4
Laurens
Jah Blessed
Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.
 
Laurens's Avatar
 
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
Sure, take a shot at it. It's open-source after all. Make a working binary and then I'll consider adding it to the main distribution.
Laurens is offline  
Old 02-16-2006, 02:46 AM   #5
trfzwsc
Junior Member
trfzwsc began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Feb 2006
Some useful information

http://www.koders.com/java/fid489640...B2CFAD134.aspx
There is a java version GZip there.

http://vmsone.com/~decuslib/vmssig/v...b-0_0_1_tar.gz
It is com.jcraft.jzlib

Hope I have time to add this feature recently.
trfzwsc is offline  
Advert
Old 02-16-2006, 03:03 AM   #6
trfzwsc
Junior Member
trfzwsc began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Feb 2006
UncompressZLib for PDB (C language)

/* uncompress ZLib compressed document/image */
static unsigned int UncompressZLib
(
unsigned char* src, /* in: compressed document */
unsigned int src_len, /* in: size of compressed document */
unsigned char* dest, /* out: buffer to put uncompressed
document in */
unsigned int dest_len, /* out: size of buffer to put uncompressed
document in */
unsigned char* owner_id /* in: owner-id key */
)
{
z_stream z;
unsigned int err;
unsigned int keylen;
unsigned int i;
unsigned char keybuf[OWNER_ID_HASH_LEN];
unsigned char owner_id_key[OWNER_ID_HASH_LEN];

ASSERT (src != NULL && src_len != 0 && dest != NULL && dest_len != 0);

keylen = 0;

if (owner_id != NULL) {
unsigned long crc;
int owner_id_len = strlen (owner_id);
crc = crc32 (0L, owner_id, owner_id_len);
for (i = 0; i < 10; i++) {
crc = crc32 (crc, owner_id, owner_id_len);
owner_id_key[(i * 4) + 0] = (crc >> 24) & 0xFF;
owner_id_key[(i * 4) + 1] = (crc >> 16) & 0xFF;
owner_id_key[(i * 4) + 2] = (crc >> 8) & 0xFF;
owner_id_key[(i * 4) + 3] = crc & 0xFF;
//*( (unsigned long *)( owner_id_key + ( 4 * i ) ) ) = crc;
}
keylen = min(src_len, OWNER_ID_HASH_LEN);
}


memset (&z, 0, sizeof z);

if (owner_id != NULL) {

for (i = 0; i < keylen; i++)
keybuf[i] = src[i] ^ owner_id_key[i];
z.next_in = keybuf;
z.avail_in = keylen;

}
else {

z.next_in = src;
z.avail_in = src_len;

}

z.next_out = dest;
z.avail_out = dest_len;

err = inflateInit (&z);
if (err != Z_OK) {
return err;
}

do {
if (z.avail_in == 0 && keylen > 0) {
z.next_in = src + keylen;
z.avail_in = src_len - keylen;
keylen = 0;
}

err = inflate (&z, Z_SYNC_FLUSH);

if( err == Z_MEM_ERROR )
{
fprintf( stderr, "[out of memory doing uncompress]\n" );
}
else if( err == Z_BUF_ERROR )
{
fprintf( stderr, "[output buffer too small doing uncompress]\n" );
}
else if( err == Z_DATA_ERROR )
{
fprintf( stderr, "[input data corrupted doing uncompress]\n" );
}
else if( err != Z_OK )
{
fprintf( stderr, "[error while uncompressing (%d)]\n", err );
}
} while (err == Z_OK);

if (err != Z_STREAM_END)
return err;

ASSERT (z.total_out == dest_len);

return inflateEnd (&z);
}
trfzwsc is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content supported dictionary Edy Amazon Kindle 18 07-10-2010 05:31 AM
Gen3 So, are folders supported now? celopmuh Bookeen 1 05-23-2010 04:18 PM
Supported ??G SD card? Ivan iRex 12 09-01-2009 07:17 AM
Why supported formats don't matter to me (very much) Bob Russell News 22 12-03-2008 04:45 AM
Supported memory cards TadW Amazon Kindle 0 12-01-2007 04:35 PM


All times are GMT -4. The time now is 02:10 PM.


MobileRead.com is a privately owned, operated and funded community.