IP Library Granted Patent US 7,245,238
Granted Patent B2
US 7,245,238 · App. 11/064,823 · Granted Jul 17, 2007

Method and apparatus for data encoding

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,245,238
App. No.
11/064,823
Granted
Jul 17, 2007
Kind
B2
Abstract

A method and apparatus for data encoding such as 3 to 4 encoding (base64, uuencode etc.) is provided. Bytes of data to be encoded having negative values are made positive while preserving the information to be encoded. The positive values may be manipulated by addition (e.g. to a common store) and bit shifting to efficiently obtain encoded data such as by indexing an encoding alphabet.

Claims (31)

1. A method for encoding data comprising:

obtaining a portion of data to be encoded, the portion comprising ordered bytes of signed data;

for each byte of signed data having a negative value, converting the negative value to an equivalent positive value;

adding a positive value or the equivalent positive value of each byte of signed data to a respective portion of a common store of signed data in accordance with the order of the bytes in said portion of data; and

obtaining an encoded representation of the portion of data using said common store of signed data.

2. The method of claim 1 wherein converting the negative value comprises storing the value of the byte as a data type of the common store and adding 256.

3. The method of claim 1 wherein converting the negative value comprises storing the value of the byte as a data type of the common store and bit masking the negative value to produce an equivalent positive value.

4. The method of claim 1 wherein obtaining an encoded representation comprises determining characters of an encoding alphabet in accordance with respective bit values of the common store.

5. The method of claim 4 comprising bit shifting the common store and bit masking the common store to determine the respective bit values.

6. The method of claim 5 wherein the encoding alphabet is a base64 alphabet comprising the 64 characters “A” to “Z”, “a” to “z”, “0” to “9”, “+”, “/” and “=” and the respective bit values of the common store are determined from 6-bit portions of the common store.

7. The method of claim 1 comprising converting each byte of signed data to a data type of said common store to facilitate said adding.

8. The method of claim 7 wherein the data type of the common store is a signed integer.

9. The method of claim 1 including padding the encoded representation of data when necessary.

10. A method for encoding three bytes of data as four bytes of encoded data comprising:

for each of the three bytes of data:

converting each byte of data to a data store of an integer data type said data store having an equivalent positive value to said byte; and

adding the data store to a common store of the integer data type in accordance with an order of the three bytes of data; and

for each one of the four bytes of encoded data:

bit shifting the common store and masking the common store to obtain a respective portion of the common store; and

using the respective portion to define a respective byte of the four bytes of encoded data.

11. The method of claim 10 wherein converting each byte of data comprises adding 256 to the data store when the respective byte of data has a negative value.

12. The method of claim 10 wherein converting each byte of data comprises bit masking the data store to produce an equivalent positive value.

13. The method of claim 10 comprising bit shifting the data store in accordance with the order of the 3 bytes of data to facilitate said adding.

14. The method of claim 10 wherein said bit shifting and masking of the common store selects 6-bits to determine said respective portion of the common store.

15. The method of claim 10 wherein using the respective portion comprises obtaining a character of an encoding alphabet in accordance with a value of the respective portion.

16. The method of claim 10 including padding the 4 bytes of encoded data.

17. An apparatus for encoding data comprising a processor and a memory coupled to the processor, the memory storing machine-readable instructions for controlling the processor to:

obtain a portion of data to be encoded, the portion comprising ordered bytes of signed data;

for each byte of signed data having a negative value, convert the negative value to an equivalent positive value;

add a positive value or the equivalent positive value of each byte of signed data to a respective portion of a common store of signed data in accordance with the order of the bytes in said portion of data; and

obtain an encoded representation of the portion of data using said common store of signed data.

Assignments (3)
NUNC PRO TUNC ASSIGNMENT Recorded Jun 19, 2023
From: BLACKBERRY LIMITED
To: MALIKIE INNOVATIONS LIMITED
Reel/Frame 064269/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 16, 2023
From: BLACKBERRY LIMITED
To: MALIKIE INNOVATIONS LIMITED
Reel/Frame 064104/0103 →
CHANGE OF NAME Recorded Nov 6, 2014
From: RESEARCH IN MOTION LIMITED
To: BLACKBERRY LIMITED
Reel/Frame 034179/0923 →