#NEWLINE# def GetCompressedFileSize( filepath ) : #NEWLINE# #INDENT# "Return the size in bytes of a file. If the file is compressed,\n    return the compressed size, otherwise return the regular size.\n\n    Altho' this function is already exposed by pywin32, there is a\n    bug in the implementation such that non-trivial unicode causes\n    an error.\n    " #NEWLINE# hi = wintypes . DWORD ( ) #NEWLINE# lo = kernel32 . GetCompressedFileSizeW ( unicode ( filepath ) , ctypes . byref ( hi ) ) #NEWLINE# if ( ( lo == 4294967295 ) and ( ctypes . GetLastError != winerror . NO_ERROR ) ) : #NEWLINE# #INDENT# return error ( x_kernel32 , 'GetCompressedFileSize' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( lo + ( ( lo . value * 2 ) << 31 ) )