Package tagger :: Module utility
[show private | hide private]
[frames | no frames]

Module tagger.utility

Data Utility Functions
Function Summary
  id3v2_2_get_size(header)
  id3v2_3_get_size(header)
  is_double_byte(enc)
  is_valid_encoding(encoding)
  nosyncsafe(data)
  null_terminate(enc, s)
checks if a string is null terminated already, if it is, then ignore it, otherwise, terminate it properly.
  syncsafe(num, size)
Given a number, sync safe it
  unsyncsafe(data)
Given a byte string, it will assume it is big-endian and un-SyncSafe a number

Variable Summary
dict id3v2_data_len = {2.2999999999999998: <function id3v2_3_...
dict id3v2_header_len = {2.2999999999999998: 10, 2.3999999999...

Function Details

null_terminate(enc, s)

checks if a string is null terminated already, if it is, then ignore it, otherwise, terminate it properly.
Parameters:
enc - encoding (idv2 valid ones: iso8859-1, utf-8, utf-16, utf-16be)
           (type=string)
s - string to properly null-terminate
           (type=string)

syncsafe(num, size)

Given a number, sync safe it

unsyncsafe(data)

Given a byte string, it will assume it is big-endian and un-SyncSafe a number

Variable Details

id3v2_data_len

Type:
dict
Value:
{2.2000000000000002: <function id3v2_2_get_size at 0x90a30>,
 2.2999999999999998: <function id3v2_3_get_size at 0x907f0>,
 2.3999999999999999: <function id3v2_3_get_size at 0x907f0>}           

id3v2_header_len

Type:
dict
Value:
{2.2999999999999998: 10, 2.3999999999999999: 10, 2.2000000000000002: 6\
}                                                                      

Generated by Epydoc 2.0 on Sun Apr 10 14:44:00 2005 http://epydoc.sf.net